Code Monkey home page Code Monkey logo

Comments (7)

Erroneous1 avatar Erroneous1 commented on May 20, 2024 1

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.

Erroneous1 avatar Erroneous1 commented on May 20, 2024

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.

eddic avatar eddic commented on May 20, 2024

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.

Erroneous1 avatar Erroneous1 commented on May 20, 2024

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.

eddic avatar eddic commented on May 20, 2024

Again, thanks @Erroneous1 for solving this one.

from fastcgipp.

eddic avatar eddic commented on May 20, 2024

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.

ZhangzheBJUT avatar ZhangzheBJUT commented on May 20, 2024

Excellent! i expect your good news! @Erroneous1

from fastcgipp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.