[TYPO3-dev] Temporarily Closing Typo3 Database Connection
Frank Weindel
fjw24 at drexel.edu
Mon Mar 16 15:05:06 CET 2009
Mathias Schreiber [wmdb >] wrote:
> Frank Weindel schrieb:
>> Hi all,
>>
>> We've got a cli module that sends out mass mailings to subscribed
>> users. The database is first queried to find out what specific
>> mailings need to go out, and then they are sent out one after another.
>> We've got 20000+ people subscribed so the actual sending takes upwards
>> 30 minutes or more.
>>
>> The problem is after each batch sending we need to update the database
>> to let it know the mailing went out successfully, and by that time our
>> connection to the database has timed out. Our ideal solution is to
>> close the Typo3 database connection before sending out a batch mailing
>> and then reestablish the connection afterwards. The t3lib_DB class
>> doesn't seem to provide for this ability, it does not even seem to
>> have a wrapper method to call the mysql_close() function.
>>
>> Is there any recommended way to do this?
>
> Could you get into a little more detail?
> Because I don't get why you close te connection to the database at all?
> Are two different databases involved?
>
> cheers
> mathias
mathias,
Thanks for your reply. The problem is that the function that sends out
the mass mailing to 20000+ people takes a very long time to finish and
does not access the database. So sometime during the execution of that
function we lose the connection to the database so after that function
returns and we try to query the database it fails. I'm thinking the
disconnection is due to a connection timeout. We do not want to increase
the timeout.
Thanks,
Frank Weindel
More information about the TYPO3-dev
mailing list