简体   繁体   English

服务器|配置问题,php脚本死,没有错误日志,没有原因

[英]server|configuration problem, a php script just die with no error log & no reason

thanks for your attention & sorry for my bad english hahaha also this is not a programming error, or thats what I think, I think this is an error in some configuration of the server or something else but I dont know what) 感谢您的关注和对不起我的英语不好哈哈哈(这也不是编程错误,或者那是我的想法,我认为这是服务器某些配置中的错误或其他错误,但我不知道是什么)

I have a php script (is running like a process of linux, its not running on the web browser) that send SMS via SMPP on the port 2055 (using sockets in php) & then inserts like 10,000 rows into a dababase on MySQL, the script gets the data from a XML file; 我有一个php脚本(正在像linux进程一样运行,它没有在网络浏览器上运行),该脚本通过端口2055上的SMPP发送短信(使用php中的套接字),然后将10,000行插入MySQL的dababase中,脚本从XML文件获取数据; firts it was running in a shared server (Hostgator is our hosting provider) & at the begining it worked fine, with no trouble, but 5 months later an error appear, the process just die with no reason, the script only sent & inserted 700 rows in the table of the database & the process didnt show any warning or error, nothing appears in the error logs, & I didnt make any change in the script Hostgator never helped us hahaha so we decided to move the script from the shared server to a dedicated server; 触发它在共享服务器(Hostgator是我们的托管服务提供商)上运行,并且起初运行正常,没有问题,但是5个月后出现错误,该过程无故终止,脚本仅发送并插入了700数据库表中的行和进程未显示任何警告或错误,错误日志中未显示任何内容,并且我没有对脚本进行任何更改Hostgator从未帮助过我们哈哈哈,所以我们决定将脚本从共享服务器移至专用服务器; I thought it was a memory problem or something like that, but when we move the script to the dedicated server the problem just get worse, the script die when has just sent & inserted 40 to 50 rows to the database 我以为是内存问题或类似问题,但是当我们将脚本移到专用服务器时,问题变得更糟,当刚向数据库发送并插入40至50行时,脚本就死了

the information about this error: 有关此错误的信息:

  1. the shared server is on Red Hat 4.1.2-46 & the dedicated server is on CentOS 5.4 共享服务器在Red Hat 4.1.2-46上,专用服务器在CentOS 5.4上
  2. I have commented the line that sends the SMS, & the problem remains 我评论了发送短信的行,问题仍然存在
  3. in the shared server, at the begining the script was fine, but then the script started to die when has just inserted 700 aprox. 在共享服务器上,脚本一开始就很好,但是随后,当刚插入700个aprox时,脚本开始死亡。 in the database, & now the script is dying when has inserted 2500 rows, its better but we didnt change anything 在数据库中,现在插入2500行时该脚本快死了,效果更好,但我们没有做任何更改
  4. in the dedicated server, the script dies when has just inserted like 40 row in the table 在专用服务器中,脚本在刚刚插入表中的40行时消失
  5. the script, before it dies, change to a zombie process & we dont know why 该脚本在死亡之前更改为僵尸进程,我们不知道为什么
  6. the usage of memory appears to be 0.3%, and of the cpu appears to be 0.7% to 1% 内存使用率似乎是0.3%,CPU使用率似乎是0.7%至1%
  7. I have changed the max memory limit of php to 128Mb, and even to -1 (so php wont have any limit) but the problem remains 我已将php的最大内存限制更改为128Mb,甚至更改为-1(因此php将没有任何限制),但问题仍然存在
  8. we have the limit of 50 connections of mysql at the same time, so I think this is not the problem 我们同时限制了mysql的50个连接,所以我认为这不是问题
  9. Im using mysqli to connect from php to mysql 我正在使用mysqli从php连接到mysql
    1. Hostgator report that they haven't made any change or update in the servers Hostgator报告他们没有对服务器进行任何更改或更新

what could be the problem?? 可能是什么问题呢?? what should I do??? 我该怎么办??? what should I search??? 我应该搜索什么? is something in the logic Im missing?? 我逻辑上缺少什么吗? what steps do I have to follow when managing & searching problems of process on Linux??? 在Linux上管理和搜索过程问题时,我必须遵循什么步骤?

thank you very much, I think this is not a programming problem, but you have more experience than me, you can tell me thanks!!! 非常感谢,我认为这不是编程问题,但是您比我有更多的经验,可以告诉我谢谢!!! bye!!! 再见! :) :)

I don't think your script dies, but it is timed out. 我不认为您的脚本已死,但已超时。 See your PHP configuration and remove any time outs for this specific script. 查看您的PHP配置,并删除此特定脚本的任何超时。 - http://php.net/manual/en/function.set-time-limit.php -http://php.net/manual/en/function.set-time-limit.php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM