Alex Menendez <[EMAIL PROTECTED]> wrote:
>this destroy routine is definitely a problem (may or may not be the cause
>of the error though) apache::dbi over-rides the dbi connect method in
>order to check an internal hash of cached db handles so that an existing
>connection can be returned rather than taking the performance hit of
>establishing another connection....similarly, all disconnect methods under
>apache::dbi are over-ridden to do nothing when they are called so existing
>db handles remain persistant.
The destroy method is for a class I created, not Apache::DBI or DBI.
This method in no way overrides any method in Apache::DBI or DBI.
(Sorry if that wasn't clear.)
>Your code has a problem, however, in that after the disconnect method is
>called you completely delete the hash element that contains the dbh
>pointer. any subsequent connects will attempt to use a cached handle that
>is actually gone which will generate an error. just take out the delete
>bit and you should be all good.
I am merely destroying my own copy of the reference to the connection.
Apache::DBI still has it's own copy of the reference.
>PS> the reason it works sometimes is merely because your code is being
>run by an apache child process for the first time. As soon as it is run
>again by the same process it should fail.....
There are no problems when run with `httpd -X' which of course only has
one server. It is with multiple servers I run into problems.
--
James Smith <[EMAIL PROTECTED]>, 409-862-3725
Texas A&M CIS Operating Systems Group, Unix