Thanks for that patch. It doesn't compile on Mac OS, but it seems
likely that there is some simple fix.
As for the original problem, it sounds like it's definitely a bug in
Ur/Web, but I don't anticipate having the time to debug it in detail
myself for another few weeks. It seems likely that your theory is
right, that your library's unusual (for Ur/Web) use of process spawning
has triggered some pathology.
On 04/15/2017 03:05 PM, Sergey Mironov wrote:
I've carried out more experiments to find out the source of the zero
request_id problem, without success. There is an important detail: I
use FFI library (urweb-callback) to spawn async jobs from custom
worker threads. Those threads do run uw_begin/uw_commit/uw_rollback
(and eventually call [send] on stored channels), but they don't handle
normal http requests and AFAIK should never trigger calls to
fastcgi_write method. Please tell me if I am wrong and uw_begin may
actually result in call to fastcgi_write.
Besides that, I tracked another issue regarding socket inheritance by
child processes due to missing CLOEXEC flag.
Here is the pull request https://github.com/urweb/urweb/pull/75
Regards,
Sergey
2017-04-15 1:46 GMT+03:00 Sergey Mironov <[email protected]>:
Yes, I am able to reproduce the error with the latest Ur/Web. I've
checked the related code and didn't find any obvious errors. But, if I
replace the following assignment
o->r.requestIdB0 = current_request_id & 0x000000ff;
with the assignment to 1, the error disappears.
Very strange.
Regards,
Sergey
2017-04-14 18:28 GMT+03:00 Benjamin Barenblat <[email protected]>:
On Thu, Apr 13, 2017 at 6:35 PM, Sergey Mironov <[email protected]> wrote:
I am facing a problem running the application compiled in FastCGI mode
with nginx. The error on server says
2017/04/14 01:19:13 [error] 11847#0: *2 upstream sent unexpected
FastCGI request id low byte: 0 while reading response header from
upstream, client: 127.0.0.1, server: , request: "POST /.msgs
HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host:
"127.0.0.1:8081", referrer: "http://127.0.0.1:8081/App/convertFile/48"
That sounds suspiciously like
<https://github.com/urweb/urweb/issues/57>. Are you running the latest
version of Ur/Web?
_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur