Ticket #1041 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

FastCGI 500 Internal Server error under moderate load on Solaris 10

Reported by: colin.stephen@o2.com Assigned to: jan
Priority: normal Milestone: 1.4.13
Component: core Version: 1.4.13
Severity: normal Keywords: fastcgi
Cc: Blocking:
Need Feedback:

Description

Under moderate load, with a quickly responding external FastCGI handler around 5% of requests get a 500 response. Under the same conditions the problem occurs on Solaris 10 (sparc), but not Linux.

Investigation showed that the read in fcgi_demux_response was failing with EAGAIN - although FIONREAD indicates data is waiting.

As for the proposed mod_proxy patch, the solution is basically to return 0 and try again on the next pass on each of the calls which can EAGAIN. There is a complication in that the chunkqueue_get_append_buffer needs to be rolled back / reused.

I'm attaching a patch to do this, although it would be less crude to use a function in chunk.h to free the latest chunk, or to make chunkqueue_get_append_buffer return the same buffer again on the second call.

Attachments

lighttpd-1.4.13.patch-FastCGI-EAGAIN (1.5 kB) - added by colin.stephen@o2.com on 02/19/2007 11:25:15 AM.
Patch to handle EAGAIN in mod_fastcgi.c

Change History

02/19/2007 11:25:15 AM changed by colin.stephen@o2.com

  • attachment lighttpd-1.4.13.patch-FastCGI-EAGAIN added.

Patch to handle EAGAIN in mod_fastcgi.c

02/19/2007 01:50:18 PM changed by darix

  • status changed from new to closed.
  • resolution set to fixed.

patch applied to the 1.4.x branch


Add/Change #1041 (FastCGI 500 Internal Server error under moderate load on Solaris 10)




Change Properties
Action