Comments (7)
No problem. I'm in the process of updating my 2.1 code to 3.0. So far I am loving the improvements!
from fastcgipp.
Maybe this will help a bit with the problem. I added debug statements to see if this error happens in the middle of a request or after and it looks like it only happens after returning true from response().
May 18 15:59:49 localhost iw_work[5679]: iw_libsrv/src/request.cpp@74: response() start
May 18 15:59:49 localhost iw_work[5679]: iw_libsrv/src/request.cpp@78: response() returning false
May 18 15:59:49 localhost iw_work[5679]: iw_libsrv/src/request.cpp@64: response() finished
May 18 15:59:49 localhost iw_work[5679]: iw_libsrv/src/request.cpp@66: response() returning true
May 18 15:59:49 localhost iw_work[5679]: May 18 15:59:49 localhost /usr/bin/iw_work[5679] [error]: Poll gave fd 7 which isn't in m_sockets.
The last line is repeated a total of 963 times.
I have an atomic enum that I set to either start/working/finished that gets set to finished before calling callback()
. As you can see, it doesn't receive any new calls to response()
after it returns true, and is then outputting all of those "Poll gave fd X" lines.
My guess is that something isn't quite closed.
from fastcgipp.
Yeah. This is a tough one. I'd guess that the OS just isn't cleaning things up as quickly as fastcgi++ is expecting it to. I myself have never run into this issue but I suspect different system configurations have different socket cleanup strategies. In all fairness it's probably not worth even throwing an error message since the code tries again to fully clean things up. It's more just intended to notify you that, although everything is okay, something happened that was unexpected.
Are your systems Linux epoll() or posix select()?
from fastcgipp.
I'm in Linux. My guess is that it's not sending the data, or not all of it. I don't know enough about how it works or about epoll but could it be that we still have data to send when we call Socket::close()
and epoll_wait is reporting that data is still pending being sent or that the server is acknowledging the data being sent? When it happens the browser gets a 500 error and Apache gives me the following in error_log:
[Fri May 18 17:09:33.146196 2018] [fastcgi:error] [pid 30954:tid 140414342387456] [client 10.7.1.9:55502] FastCGI: incomplete headers (0 bytes) received from server "/srv/http/w", referer: https://10.7.1.10/w
My setup is Fastcgipp is listening on a TCP port and Apache w/ fastcgi_module is on a remote server on same lan. I'm running the Manager on a single thread and pushing all response handling to a thread pool.
from fastcgipp.
Again, thanks @Erroneous1 for solving this one.
from fastcgipp.
Ah glad to hear it! Let me know once you feel it is running smoothly and we'll do a 3.1 "Aaron" release with all your fixes.
from fastcgipp.
Excellent! i expect your good news! @Erroneous1
from fastcgipp.
Related Issues (20)
- [failed build example]try use c++20 modules for compile my example
- Support the Meson build system. HOT 1
- Prevent GCC warnings
- Sould not register signal handlers HOT 3
- how to make a json response? HOT 1
- Windows systems not supported??? HOT 1
- 3.1 Release HOT 1
- undefined reference to pthread, for examples HOT 3
- error: ‘Fastcgipp::Http::RequestMethod’ is not a class or namespace
- Are you accepting pull requests? HOT 3
- tests/curl.cpp cannot POST data to another website HOT 7
- Overview of logging mechanism
- fastcgipp and proxy HOT 1
- CMake PostgreSQL missing required version number HOT 4
- io_uring support? HOT 2
- postgres pipline query HOT 1
- Raspberry Pi with nginx: Echo example gives 413 Request Entity Too Large on form submit HOT 4
- Permission not being set on unix socket according to permission parameter in listen() call. HOT 2
- Error during compilation on Ubuntu 16.04, g++ 5.4 HOT 2
- Missing virtual destructor in Curl_base HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastcgipp.