http://qs321.pair.com?node_id=11119909


in reply to Re^6: Getting query string with CGI::Fast
in thread Getting query string with CGI::Fast

In a shared hosting environment it is normal for the webserver to get a graceful restart whenever a new user is added or an existing user is deleted. There can be other events that trigger a graceful as well. A graceful restart will cause a new apache process to start accepting connections, and the old process will then shut down after the last open connection ends either through completing the transaction or timing out (whichever comes first).

If your data is not written to a more persistent data store it wouldn't surprise me at all for in-memory data to fall out of scope when a restart happens. This typically won't happen during a request, but between requests all bets are off. On a shared host serving possibly hundreds of users' content, restarts can happen fairly regularly. Within a given transaction your data's integrity is pretty reliable. Between transactions I would work pretty hard to assure I'm not relying on in-memory persistence. The best approach really is to use scoping carefully to avoid data being relied upon spanning across multiple requests, and to leverage the persistent storage options provided by the host; usually a database or the filesystem.


Dave

  • Comment on Re^7: Getting query string with CGI::Fast

Replies are listed 'Best First'.
Re^8: Getting query string with CGI::Fast
by Anonymous Monk on Jul 28, 2020 at 16:17 UTC

    Very helpful and informative comment. Thanks a zillion!