Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7844189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:48:01+00:00 2026-06-02T16:48:01+00:00

From my understanding as soon as you call FCGI_Accept() after processing your request the

  • 0

From my understanding as soon as you call FCGI_Accept() after processing your request the server closes the connection with the client and it becomes impossible to send anything else to that client. Thus I’m wondering if there is any way to prevent that and “save” the connection (handle?) so that I can respond to the request after processing another request. I’m planning to use mod_fastcgi on Apache, if it makes a difference.

The story:

I’m trying to make an instant messaging system using FastCGI on the server and Ajax long-polling on the client side. The idea is to make an event-driven server where a client’s “get” request checks for outstanding message to return or have the connection stored for later response; and a “send” request checks for an available connection to the recipient or store the message in memory if unavailable. The only reason I’m using FastCGI in the first place is because as it uses a persistent process it allowed resource sharing between connection, so I’m open for other suggestions. I am aware that you can use a database as a shared resource and have each connection spawn a process that polls the database for new information, and although it works it seems terribly inefficient. The only other alternative I can think of at the moment (if FastCGI cannot accomplish what I need) is to create a custom Apache module that implements the above, but that’ll probably be more trouble then it’s worth.

I’ve just started researching into FastCGI so perhaps this is not the most appropriate solution to my problem, but this is the first obstacle I ran into. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T16:48:04+00:00Added an answer on June 2, 2026 at 4:48 pm

    What your are describing have nothing todo with FastCGI. It’s the way connection less architecture HTTP is working. Long polling sesstions have to be hold be by the client (and server in the best case). Continue reading at http://xmpp.org/extensions/xep-0206.html

    A more advanced but new technology is http://www.websocket.org/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From my understanding the XMPP protocol is based on an always-on connection where you
From my understanding, each of these methods: get() and put() are atomic. But, when
From my understanding of the docs this general approach should work: begin try1 rescue
From my understanding by reading several articles I assumed Process Address Space(PAS) and Virtual
MariaDB 5.3 introduced dynamic columns. From my understanding the next version of mysql should
From what little understanding of Cassandra I have, it seems that data locality is
I have some not understanding actions from gnu clisp Suppose, I have some code
My understanding is that it's advised testers are separate from developers, i.e you obviously
It is my understanding that although Mercurial has support from branches, the community generally
I am not understanding the 'aligning allocated memory' part from the mprotect usage. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.