Project

General

Profile

Actions

Bug #1041

closed

FastCGI 500 Internal Server error under moderate load on Solaris 10

Added by Anonymous over 17 years ago. Updated over 17 years ago.

Status:
Fixed
Priority:
Normal
Category:
core
Target version:
ASK QUESTIONS IN Forums:

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.

-- colin.stephen


Files

lighttpd-1.4.13.patch-FastCGI-EAGAIN (1.54 KB) lighttpd-1.4.13.patch-FastCGI-EAGAIN Patch to handle EAGAIN in mod_fastcgi.c -- colin.stephen Anonymous, 2007-02-19 11:25
Actions #1

Updated by darix over 17 years ago

  • Status changed from New to Fixed
  • Resolution set to fixed

patch applied to the 1.4.x branch

Actions

Also available in: Atom