O
Oliver Green
Hi,
I'm using Apache::Registry to speed up my cgi scripts. So far I've not
modified the scripts themselves apart from moving most of the common
"use <Module>" to the startup-script so Apache caches them.
As all scripts connect to a database (using DBI), I might as well move
the connect statement to the startup-script. This works, and apparently
the connection is now shared by all the children that Apache forks.
However, I have a hard time telling if it will work correctly under
load. I suspect that by re-using the same connection over and over I
might get some concurrency issues, or inconsistency errors.
How would I setup a test on my (modest) development system simulating
high usage?
And I would love to hear from someone that actually knows if this
connection sharing is at all advisable.
I even thought about sharing the statement handles (make a hash in the
startup script, and add the statements with their handles and just
re-execute them), but haven't tried that yet.
Any info is appreciated,
Oliver Green
I'm using Apache::Registry to speed up my cgi scripts. So far I've not
modified the scripts themselves apart from moving most of the common
"use <Module>" to the startup-script so Apache caches them.
As all scripts connect to a database (using DBI), I might as well move
the connect statement to the startup-script. This works, and apparently
the connection is now shared by all the children that Apache forks.
However, I have a hard time telling if it will work correctly under
load. I suspect that by re-using the same connection over and over I
might get some concurrency issues, or inconsistency errors.
How would I setup a test on my (modest) development system simulating
high usage?
And I would love to hear from someone that actually knows if this
connection sharing is at all advisable.
I even thought about sharing the statement handles (make a hash in the
startup script, and add the statements with their handles and just
re-execute them), but haven't tried that yet.
Any info is appreciated,
Oliver Green