这个贴子是
http://topic.csdn.net/u/20110517/13/8776eb52-672a-45ac-946e-7aa7a3c7e33b.html
的继续。现在这个问题似乎还是没有解决我重新编写了index.php,现在index.php不再调用数据库,甚至都包含操作mysql的类文件。
a.php也不调用数据库,它只执行采集的任务。
a.php与index.php是两个独立文件,它们共同包含了另外两个文件(这两个文件中并不执行任务,只是函数),现在的情况是在执行a.php进行采集时,index.php却打不开,等a.php采集完成后index.php才能正常打开。请问这是哪儿出现了问题?
同时,我观察了在执行a.php进行采集时,电脑的CPU和内存消耗并无显明变化。
http://topic.csdn.net/u/20110517/13/8776eb52-672a-45ac-946e-7aa7a3c7e33b.html
的继续。现在这个问题似乎还是没有解决我重新编写了index.php,现在index.php不再调用数据库,甚至都包含操作mysql的类文件。
a.php也不调用数据库,它只执行采集的任务。
a.php与index.php是两个独立文件,它们共同包含了另外两个文件(这两个文件中并不执行任务,只是函数),现在的情况是在执行a.php进行采集时,index.php却打不开,等a.php采集完成后index.php才能正常打开。请问这是哪儿出现了问题?
同时,我观察了在执行a.php进行采集时,电脑的CPU和内存消耗并无显明变化。
http://surmise-sky.com/thinkin-about-php-session-lock-operation/PHP locks the session file until it is closed. If you have 2 scripts using the same session (i.e. from the same user) then the 2nd script will not finish its call to session_start() until the first script finishes execution.
If you have scripts that run for more than a second and users may be making more than 1 request at a time then it is worth calling session_write_close() as soon as you’ve finished writing session data.