Peter Rabbitson wrote: >>>If I run the real program I end up stuffing about 480 out of roughly 510 >>>products into a designated table and then the handle goes out to lunch with >>>the same error message. >> >>What's the error message? >> > > > Ups... I guess I missed that: > > ~$ ./test > /dev/null > Issuing rollback() for database handle being DESTROY'd without explicit > disconnect(). > DBD::mysql::db commit failed: MySQL server has gone away at ./test line 27. > >
Thank you. No guarantees, but try setting 'InactiveDestroy' when you create the DB handle. XML::Twig uses a fork/exec call in 'parseurl' to retrieve the URL in one process and to parse the XML in the other. When the retrieval is complete one of the processes closes with an 'exit'. I think because the $dbh is shared (because it just is) you are getting the above result. The switch I mentioned appears to be designed for this specific case. For more info see "InactiveDestroy" here: http://search.cpan.org/~timb/DBI-1.48/DBI.pm#ATTRIBUTES_COMMON_TO_ALL_HANDLES "This attribute is specifically designed for use in Unix applications that "fork" child processes. Either the parent or the child process, but not both, should set InactiveDestroy on all their shared handles." HTH, http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>