Running python3 script but process being killed before script completes its' task.
AnsweredI am writing a script where it take data from my cpanel database and appending it to Google Sheet online so it can be used as a dashboard for our staff to review.
The script does successfully process the data from database and appends it to the Google Sheet but it never complete the process and stops after it process 27 data into Google Sheet.
I have review all logs plus server log and I cannot find the reason or a log of maybe like "out of memory" error or something why is my python script being force to stop processing before processing all data in the database. It's stopping at the same 27th data and command shows it stopped or killed the process. I know it can't be the script because there is no kill command in script. Something on my cpanel server is stopping the script process.
I am running CentOS7. I know EoL is in like within a month or so but just dont have time to update server yet .. Ill get to it evenly .. just need to troubleshoot this first.
THank you
-
Hey there! I'm not completely sure what this issue is that you're describing. Is this a custom Python script that you created on the server? If so, it seems this would be unrelated to the cPanel tools on the machine. I'm also not sure what you mean by "cPanel database" - is this a database created and owned by a particular cPanel user?
If so, do you see any errors in the MySQL log file? That is typically located at /var/log/mysqld.log unless the path has been customized.
0 -
Hey. Thanks for helping. I suspect the script was ending due to some type of paginating. It seems that API is paginating the result so the script think it completed all data when there is more so after updating the script to check for paginating then it seems it got all of the data needed.
Reason I was posting here because I wasn't sure if there was a setting in WHM that limit the use of python scripts within users account to prevent user abusing the resource etc. That was my first concern and now I think it's the data itself being broken down per page in API so script have to be updated to go through all paginating before ending.Thanks for the help!
0 -
You're very welcome! And no, I don't know of any limits for that type of script on the WHM side.
0
Please sign in to leave a comment.
Comments
3 comments