I wanted to add a comment here as this article helped point me in the right direction.
Issues we were seeing:
1) Sometimes the session ID in the code was not that of the cookie we saw on the client side.
2) We isolated this down to having more than one instance of FastCGI running as failure rates increased the more instances one had going.
3) Even with a single instance, we still had failure.
4) Restarting apache also trashed our session for end clients.
After much review... I found success in doing the following:
1) DONT create your session within the FastCGI loop.
2) DO create your session inside an area that is called by your fast CGI app. In our case it was something like "ProcessRequest".
By us change the where we created sessions... We were able to:
1) Constantly read a cookie. Even after an apache restart.
2) Handle multiple instances of FastCGI 1-???.
3) Timeouts from FastCGI also no longer had negative impacts on our sessions.
Good luck... Glad I could share our resolution. And thanks for the original post as this is what helped me find our issues.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.