PHP7 readfile()/ file_get_contents()超时

On server A I'm trying to readfile() (or file_get_contents()) an url which basically just echo's a line of text which should then be displayed. This basically works but on some "server B's" I get a pesky timeout and I cannot put my finger on why that is happening. The string is then not returned and a PHP warning thrown.

I've already checked for the necessary php.ini settings and basically fopen() wrappers and stuff should work, so I'm stumped.