Thanks Amand. I did as you suggested I was already using the flups and
wsgi like this:
if __name__ == "__main": flups.WSGIServer(web.application(urls, globals
()).wsgifunc(), multiplexed=False).run()
I tried with maxThreads = 2 and still no luck.
After further benchmarking using ApacheBench and a test case I made
with web.py to read 1000 entries from sqlite and add them to a string
I found that it never ran out of memory and there was always atleast
2MB free. This is about 5% which is fairly reasonable since I only
have 32MB to start with. So I dont think the threading is a problem
and I have a memory leak in my real application. So for now I am going
through all the code to try and find it. Any one used Dozer (http://
pypi.python.org/pypi/Dozer) before to try and find memory leaks with
web.py applications?

Thanks for your help.

Cheers,
Brendon

On Jul 1, 1:52 pm, Anand Chitipothu <[email protected]> wrote:
> 2009/7/1 brendon <[email protected]>:
>
>
>
> > Thanks Amand that makes sense. Is it possible to reduce the number of
> > threads in the flups source code? Because the processor is embedded
> > and only 200MHz 32bit.
>
> Looks like it is possible by monkey patching web.wsgi.runfcgi. Add the
> following code to your application.
>
> def runfcgi(func, addr=('localhost', 8000)):
>     """Runs a WSGI function as a FastCGI server."""
>     import flup.server.fcgi as flups
>     return flups.WSGIServer(func, multiplexed=True, bindAddress=addr,
> maxThreads=10).run()
>
> web.wsgi.runfcgi = runfcgi
>
> Anand
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to