ERROR 500 | 104(Connection reset by peer + Premature end of script headers | Magento

I’m trying to figure out why I am getting an error 500 message after about 7 minutes of execution time on my magento website when generating a google sitemap.

Here are the only clues I have from the error logs:

[Sat Dec 14 11:18:43 2013] [warn] [client MYIP] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: https://www.mysite.com/index.php/admin/sitemap/index/
[Sat Dec 14 11:18:43 2013] [error] [client MYIP] Premature end of script headers: index.php, referer: https://www.mysite.com/index.php/admin/sitemap/index/

I cannot find any entries in php.ini for any timeout values related to mod_fcgid.

Any help or guidance would be greatly appreciated,

Thanks,
SR

Howdy,

Do you still see the same problem if you change the PHP Execution Mode to CGI? You can do that in System Settings -> Website Options.

-Eric

Hi Eric,

Okay I did that, now I received:

“The gateway did not receive a timely response from the upstream server or application.” (Error 504)

It actually took much less time to generate that error on CGI vs FastCGI.

Thanks for your help,

SR

Howdy,

Hmm, is that error showing up in your browser, or in the Apache logs?

That almost sounds like another component is involved and generating that error, such as a proxy…

-Eric

Hi Eric,

Yes that error was in the apache log for the virtual server.

I ended up finding a module that replaces the original magento sitemap and that seems to have given me an acceptable work around.

Thanks Eric!

SR