>
> PHP allows writing stupid code. Because even if a part of the code starts 
> performing an infinite root or somthing, the process in the end dies 
> without affecting other connections or parts of the web-app. 
>
> How does this work with Python? What happens if a part of the app, during 
> production, goes crazy? Will the web2py app crash? Will it re-launch it 
> self automatically or is it necessary to use something like "forever"?
>

If your app code generates an error, the web2py framework will catch the 
error and issue an appropriate response (rollback database transactions, 
generate a ticket with the traceback, return an error message). The error 
handling behavior can be customized via 
routes_onerror: http://web2py.com/books/default/chapter/29/4#Routes-on-error. 
See also the end of this 
section: http://web2py.com/books/default/chapter/29/4#Dispatching.

Also, assuming you're using a threaded web server (e.g., apache), an error 
on a given request will only affect that request's thread, not the others. 
If it's not an error but just something that is excessively long running, 
you might be able to configure the server to set a timeout per request.

Anthony

Reply via email to