|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-08-29 04:57 UTC] mansion@php.net
Description:
------------
I have a MySQL database with 250000 records which I try to
convert to a Tokyo Cabinet Table database and I use this
extension for that.
After approximately 200000 records get inserted, my code
throws an exception "Unable to store columns: recv error".
Further tries to insert throw the same exception. So it
seems the socket cannot recv anymore.
I also tried with my own Tokyo Tyrant wrapper which is
written in PHP and it works. So I think there might be
something wrong in the extension regarding the way sockets
are handled/released ?
It does the same thing whether connection is persistent or
not.
Reproduce code:
---------------
foreach ($pdo->query("SELECT * FROM message") as $row) {
try {
$msg = array();
$msg['subject'] = $row['msg_subject'];
$msg['from'] = mb_convert_encoding($row['msg_from'], 'UTF-8');
$msg['date'] = $row['msg_date'];
$msg['messageid'] = $row['msg_id'];
$msg['list'] = $lists[$row['msg_fkmlist']];
$msg['inreplyto'] = $row['msg_inreplyto'];
$msg['body'] = mb_convert_encoding($row['msg_body'], 'UTF-8');
$tt->put($row['pkmessage'], $msg);
} catch (Exception $e) {
var_dump($e);exit;
}
}
Actual result:
--------------
Unable to store columns: recv error
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 15:00:01 2025 UTC |
Hello, the default timeout setting might be slightly too strict. Can you test the same code with following connect call: $tt = new TokyoTyrant("youserver", 1978, array("timeout" => 5.0); Does it get through the code?