please check if it is fixed. I had to change your fix because it was not python 2.4 compliant.
On Sep 10, 11:52 am, zahariash <karra...@gmail.com> wrote: > Hello, > > I've found some weird behavior of web2py script. After few hours from > script start it throw error: > OSError: [Errno 24] Too many open files > > Indeed, there is many attached files: > lsof -p 13149 > > python2.5 13149 www-data 24u REG 202,0 0 2702 /tmp/ > tmpkvWcld (deleted) > python2.5 13149 www-data 36u REG 202,0 0 2708 /tmp/ > tmpL9F9BA (deleted) > python2.5 13149 www-data 30u REG 202,0 0 2659 /tmp/ > tmpLNUWac (deleted) > ... > > It seems, that temp file generated in wsgibase function isn't closed > properly. > Here is fix. Works for me... > > ------- CUT --------- > +++ /src/web2py/gluon/main.py Thu Sep 10 18:18:43 2009 > @@ -464,7 +464,9 @@ > return HTTP(http_error_status, error_message_ticket > % dict(ticket=ticket), web2py_error='ticket %s' > % ticket).to(responder) > - > + finally: > + if request.body: > + request.body.close() > > (wsgibase, html.URL) = rewrite(wsgibase, html.URL) > > ------- CUT --------- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---