I have Apache configuration like this:

    <Proxy balancer://production>
    BalancerMember http://127.0.0.1:6543
    BalancerMember http://127.0.0.1:6544
    </Proxy>

    ProxyPass / balancer://production/
    ProxyPassReverse / balancer://production/

Ports 6543 and 6544 are pserve processes using Waitress.

>From time to time, requests to pages will fail with 502 error (roughly 1 
out of 3000 requests). When that happens, there will be logs like this from 
Waitress:

2012-08-07 18:06:28,607 ERROR [waitress][Dummy-3] Exception when serving 
/cases/new
Traceback (most recent call last):
  File 
"c:\virtualenv\production\lib\site-packages\waitress-0.8.1-py2.7.egg\waitress\channel.py",
 
line 329, in service
    task.service()
  File 
"c:\virtualenv\production\lib\site-packages\waitress-0.8.1-py2.7.egg\waitress\task.py",
 
line 173, in service
    self.execute()
  File 
"c:\virtualenv\production\lib\site-packages\waitress-0.8.1-py2.7.egg\waitress\task.py",
 
line 412, in execute
    self.write(chunk)
  File 
"c:\virtualenv\production\lib\site-packages\waitress-0.8.1-py2.7.egg\waitress\task.py",
 
line 285, in write
    channel.write_soon(rh)
  File 
"c:\virtualenv\production\lib\site-packages\waitress-0.8.1-py2.7.egg\waitress\channel.py",
 
line 311, in write_soon
    self.outbufs[-1].append(data)
  File 
"c:\virtualenv\production\lib\site-packages\waitress-0.8.1-py2.7.egg\waitress\buffers.py",
 
line 246, in append
    buf.append(s)
  File 
"c:\virtualenv\production\lib\site-packages\waitress-0.8.1-py2.7.egg\waitress\buffers.py",
 
line 54, in append
    read_pos = file.tell()
ValueError: I/O operation on closed file.
2012-08-07 18:06:28,608 ERROR [waitress][Dummy-3] Exception when servicing 
<waitress.channel.HTTPChannel 127.0.0.1:61326 at 0x7883198>
Traceback (most recent call last):
  File 
"c:\virtualenv\production\lib\site-packages\waitress-0.8.1-py2.7.egg\waitress\task.py",
 
line 76, in handler_thread
    task.service()
  File 
"c:\virtualenv\production\lib\site-packages\waitress-0.8.1-py2.7.egg\waitress\channel.py",
 
line 342, in service
    task.service() # must not fail
  File 
"c:\virtualenv\production\lib\site-packages\waitress-0.8.1-py2.7.egg\waitress\task.py",
 
line 173, in service
    self.execute()
  File 
"c:\virtualenv\production\lib\site-packages\waitress-0.8.1-py2.7.egg\waitress\task.py",
 
line 320, in execute
    self.write(tobytes(body))
  File 
"c:\virtualenv\production\lib\site-packages\waitress-0.8.1-py2.7.egg\waitress\task.py",
 
line 285, in write
    channel.write_soon(rh)
  File 
"c:\virtualenv\production\lib\site-packages\waitress-0.8.1-py2.7.egg\waitress\channel.py",
 
line 311, in write_soon
    self.outbufs[-1].append(data)
  File 
"c:\virtualenv\production\lib\site-packages\waitress-0.8.1-py2.7.egg\waitress\buffers.py",
 
line 246, in append
    buf.append(s)
  File 
"c:\virtualenv\production\lib\site-packages\waitress-0.8.1-py2.7.egg\waitress\buffers.py",
 
line 54, in append
    read_pos = file.tell()
ValueError: I/O operation on closed file.

We didn't encounter this error with Apache fronting CherryPy. It only 
started happening after switching to Waitress.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/pylons-discuss/-/KOQh10mv4JcJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to