标题: why script stops after run 1025 times [打印本页] 作者: guishoudaoge 时间: 2009-08-07 14:35 标题: why script stops after run 1025 times For visual code: http://paste2.org/p/364717
1. dont use mysql|memcache, the script will run and run, wont stop
2. use memcache, the script wont stop
3. use mysql, why such script will stop after run 1025 times and the error message is:
PHP Warning: shell_exec(): Unable to execute '/usr/bin/php /xxx/xxx/sites/xxx/web/application/data/scripts/report/test.php 1>>/tmp/haha 2>&1 & echo $!' in /xxx/xxx/sites/xxx/web/application/data/scripts/report/test.php on line 51
PHP Warning: shell_exec(): Unable to execute '/usr/bin/php /xxx/xxx/sites/xxx/web/application/data/scripts/report/test.php 1>>/tmp/haha 2>&1 & echo $!' in /xxx/xxx/sites/xxx/web/application/data/scripts/report/test.php on line 51
can u try it in your env ?作者: 网鬼 时间: 2009-08-07 22:24
$dbConfig = array(
'host' => 'xxxx'
,'username' => 'username'
,'password' => 'password'
,'dbname' => 'dbname'
);
$gdsDb = Zend_Db::factory('PDO_MYSQL', $dbConfig->GDS->toArray());
这段代码是不是有点问题?
$dbConfig->GDS->toArray()
GDS到哪里来的呢?作者: guishoudaoge 时间: 2009-08-07 23:09
dont care such details, not such mistake can afford!作者: 网鬼 时间: 2009-08-07 23:17
原帖由 guishoudaoge 于 2009-8-7 23:09 发表
dont care such details, not such mistake can afford!
I'm very very sorry!作者: guishoudaoge 时间: 2009-08-08 02:05
never mind, can u help me to do the same test.作者: guishoudaoge 时间: 2009-08-08 02:10
原帖由 网鬼 于 2009-8-7 23:17 发表
I'm very very sorry!
never mind, can u help me to do the same test !作者: geel 时间: 2009-08-11 14:39
有可能达到单用户执行进程的最大限制了。因为第一, shell_exec 的是自己,这样 test.php 始终作为父进程其某些操作可能不会退出。第二,shell执行的第二条语句 & echo $!,我想本意应该是 && echo吧,而程序里用了一个 &,这样就变成执行后挂起了,不知道跟这个有没有关系,手头没环境没法测试。