Hello, Graham,

OK. I will use modwsgi group.

Answers to your questions:

My wsgi program executes "pypy-c" program in separate process.

I was trying to use both embedded and daemon modes. Config is very simple:

<VirtualHost *>
    ServerName py.sandbox.lt
    ServerAdmin [email protected]
    ServerSignature Off
    AddDefaultCharset utf-8

    CustomLog     /var/log/apache2/py-access.log combined
    ErrorLog      /var/log/apache2/py-error.log
    LogLevel     info

    WSGIScriptAlias / /home/dalius/wsgi/py.wsgi
</VirtualHost>

py.wsgi looks like this:

from pypysandboxserver import PyPyApp
application = PyPyApp()

That's very pure and basic wsgi application. I will try version 2.X with 
daemon mode and will report result.

Thank you for very quick answer.

Regards,
Dalius

Graham Dumpleton wrote:
> Is the PyPy stuff run within the Apache/mod_wsgi process, or does it
> execute as a separate process form the Apache/mod_wsgi process which
> you then communicate with? Further, are you using embedded mode or
> daemon mode of mod_wsgi?
>
> If the process is being exec'd and using daemon mode, then probably:
>
>   http://code.google.com/p/modwsgi/issues/detail?id=87
>
> Try patch or just use version from 2.X branch out of subversion:
>
>   http://code.google.com/p/modwsgi/wiki/ChangesInVersion0204
>
> If not, will need to be clearer about mod_wsgi configuration being
> used and whether or not PyPy stuff is a separate process.
>
> BTW, appreciated if can use mod_wsgi list on Google Groups. That was
> conversation archived and answer can help someone else.
>
> Graham
>
> 2009/2/23 Dalius Dobravolskas <[email protected]>:
>   
>> Hello, Graham,
>>
>> I have problem with mod_wsgi (or most probably with Apache) and I think you
>> are the person who could answer me.
>>
>> I was experimenting with PyPy sandboxing and have written simple WSGI
>> program (see attachment if that helps to understand the problem). That
>> program basically does very simple thing: you write python code and program
>> executes it (using PyPy sandboxed interpreter). That's it. You can look at
>> this program running here http://py.sandbox.lt (behind mod_wsgi of course
>> ;-)).
>>
>> My problem is following: since I don't want my server to be abused or reused
>> as cheap computational power (that server runs several websites) I have
>> limited process to 5 seconds. In PyPy code process is terminated with
>> SIGTERM. The problem is that SIGTERM does not terminate PyPy process. I have
>> checked I can't kill process with simple kill command as well. Process can
>> be terminated only with SIGKILL.
>>
>> I have modified the code to use SIGKILL and that fits my needs but...
>> 1) I don't care too much here is process is SIGTERMed or SIGKILLed but maybe
>> I should?
>> 2) Is there way to use SIGTERM here?
>>
>> I have found some information in mod_wsgi documenation about signals and
>> Apache and tried experimenting with some mod_wsgi options but that does not
>> make any difference.
>>
>> Regards,
>> Dalius
>>
>>     


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"modwsgi" 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/modwsgi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to