You should probably look at using one of the many DBI POE Components. Most of them fork off a separate process with Wheel::Run and allow for concurrent processing.
Otherwise, yes, I would create instance variables within each session that needs them instead of globals. Depending on how deep your event chain is before a meaningful value is returned to the client, you could easily be trampling globals if say, you instantiate a statement handle on connect, while somewhere in the middle of processing events for another request. HTH, nperez On 7/19/07, Roderick A. Anderson <[EMAIL PROTECTED]> wrote:
We have a script based on "Web_Server_With_Components" from the cookbook and each of the "Important" ContentHandlers accesses a PostgreSQL database. The quick question is: Should the DBI handles and/or the statement handles be created in the ContentHandlers? Currently we're doing them outside (global) which makes us suspect they are tampling on each other and bringing the POE server down or at least un-responsive. TIA, Rod --