Async issue

From PyWPS
(Redirected from Ascyn issue)
Jump to: navigation, search

PyWPS has total support for WPS's async response, but it's not free from problems.

1) Async calls don't work in Windows

2) Fast processes don't look async


It's well known that Python has problems forking processes in Windows platforms, the use of os.fork() only works in POSIX thread systems. Hopefully PyWPS will have its code changed to drop the os.fork() in favour of 100% thread structure.

When running an async call PyWPS will generate the first response, send it to Apache, flush all stdout, and will continue working until the process reaches its end. The problem is that Apache sends the first content to the user but doesn't close the connection, leaving it open waiting for something else to come out from the CGI. Some systems/browsers will hang waiting for the connection to be terminated before showing the response XML, if the process is fast it may be the case that when the user gets the statusURL the result is already ready.

The only way to minimize this problem is to reduce the TimeOut parameter in Apache's configuration file, from 120 to a smaller value:

#Timeout 120
Timeout 2

If the XML content sent to PyWPS is too big, it may take longer than the Timeout to generate the first response (ProcessAccepted), causing for the connection to be closed without the user being aware of the status URL.


--Wikiadmin 16:53, 10 January 2011 (UTC)