I frequently get this error in my Apache error_log when attempting to upload an image. It happens virtually every other request. It is so dependable that if you click “submit” twice on the image upload page, the second request works:
[ pid=53580 thr=0x7fff707b3c20 file=ext/apache2/Hooks.cpp:859 time=2010-12-15 14:13:00.309
]: Unexpected error in mod_passenger: An error occurred while receiving HTTP upload data:
The timeout specified has expired (70007)
Backtrace:
in 'void Hooks::receiveRequestBody(request_rec*, const char*, std::string&)'(Hooks.cpp:1271)
This seems to also happen to me with attachment_fu. Any idea why so many requests hang, and what I can do to avoid it?
You’re likely running into the Safari Upload Bug. Its bitten me quite a few times in the past as well.
The fix, apparently, is to fire off an ajax request right before the form submits. I’ve been using the jQuery snippet below for a while now and it works well. There is also a non-jQuery example in the link posted above if you prefer plain javascript.