<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How do you diagnose PHP-based SQL problems?]]></title><description><![CDATA[<p dir="auto">Doing some dev work for plugins on single site Wordpress installs I keep running into <strong>a lot</strong> of MYSQL SIGKILLS. It kills itself like 5 times and then restarts, happens once every few hours (usually while dev-ing since it's just a dev site) and is back up in 5-minutes-ish.</p>
<p dir="auto">Has anyone else run into this? I feel like I run into this every time I'm developing on the backend of Wordpress. How does everyone else diagnose MySQL SIGKILL errors like this? This only happens with <strong>one</strong> installation so I know it's a plugin thing.</p>
<p dir="auto">But...the thing is - I didn't even go to the WP site today (and it's not public) and checked the log and look what I just saw.</p>
<p dir="auto"><img src="/assets/uploads/files/1625025342835-screen-shot-2021-06-29-at-11.51.26-pm-resized.jpg" alt="Screen Shot 2021-06-29 at 11.51.26 PM.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">This leads me to believe that my issue is coming from a CRON process and Cloudron runs WP-CRON once per minute which is far too often IMO so maybe there's something there, but that's literally the only thing that could have run if I didn't touch Cloudron at all today.</p>
]]></description><link>https://forum.cloudron.io/topic/5281/how-do-you-diagnose-php-based-sql-problems</link><generator>RSS for Node</generator><lastBuildDate>Tue, 19 May 2026 10:40:50 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/5281.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 30 Jun 2021 03:57:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How do you diagnose PHP-based SQL problems? on Tue, 06 Jul 2021 18:55:39 GMT]]></title><description><![CDATA[<p dir="auto">Ok, I will mark this as solved but let's investigate further if this comes up again.</p>
<p dir="auto">FWIW, if you do <code>docker exec -ti mysql /bin/bash</code> then the details mysql logs are located at <code>/tmp/mysqld.err</code> .</p>
]]></description><link>https://forum.cloudron.io/post/33467</link><guid isPermaLink="true">https://forum.cloudron.io/post/33467</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Tue, 06 Jul 2021 18:55:39 GMT</pubDate></item><item><title><![CDATA[Reply to How do you diagnose PHP-based SQL problems? on Fri, 02 Jul 2021 02:47:37 GMT]]></title><description><![CDATA[<p dir="auto">Since I can easily reproduce this I did a bunch of tests. Could never pinpoint it but after I updated to V6.3.4, I can't reproduce it at all. So, lucky release for me. <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f923.png?v=11345d81604" class="not-responsive emoji emoji-android emoji--rolling_on_the_floor_laughing" style="height:23px;width:auto;vertical-align:middle" title="🤣" alt="🤣" /></p>
]]></description><link>https://forum.cloudron.io/post/33335</link><guid isPermaLink="true">https://forum.cloudron.io/post/33335</guid><dc:creator><![CDATA[Lonkle]]></dc:creator><pubDate>Fri, 02 Jul 2021 02:47:37 GMT</pubDate></item><item><title><![CDATA[Reply to How do you diagnose PHP-based SQL problems? on Thu, 01 Jul 2021 20:26:20 GMT]]></title><description><![CDATA[<p dir="auto">Okay, looks like if I open 20 backend "edit post" pages in new tabs <strong>at once</strong> I can kill SQL at will. But...how...and why. I understand it running out of memory, but...wait, what if it runs out of memory and doesn't realize it because of swap and so it doesn't kill itself. <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f914.png?v=11345d81604" class="not-responsive emoji emoji-android emoji--thinking_face" style="height:23px;width:auto;vertical-align:middle" title="🤔" alt="🤔" /></p>
]]></description><link>https://forum.cloudron.io/post/33323</link><guid isPermaLink="true">https://forum.cloudron.io/post/33323</guid><dc:creator><![CDATA[Lonkle]]></dc:creator><pubDate>Thu, 01 Jul 2021 20:26:20 GMT</pubDate></item><item><title><![CDATA[Reply to How do you diagnose PHP-based SQL problems? on Thu, 01 Jul 2021 19:06:24 GMT]]></title><description><![CDATA[<p dir="auto">Further hunting. There's a plugin called <code>WP Time Capsule</code> that provides a "staging" server to test things out before making them live. It just copies the WP DB and files to a folder at the root called "staging" and if "staging is currently activated" and then I I try to backup Cloudron, I get this <code>Cloudron crashed/stopped</code>.</p>
<p dir="auto">But if I delete the staging folder and DB tables (you just hit delete in the plugin). Then Cloudron backs up fine.</p>
<p dir="auto">Theories?</p>
]]></description><link>https://forum.cloudron.io/post/33321</link><guid isPermaLink="true">https://forum.cloudron.io/post/33321</guid><dc:creator><![CDATA[Lonkle]]></dc:creator><pubDate>Thu, 01 Jul 2021 19:06:24 GMT</pubDate></item><item><title><![CDATA[Reply to How do you diagnose PHP-based SQL problems? on Thu, 01 Jul 2021 19:00:42 GMT]]></title><description><![CDATA[<p dir="auto">Oh, I forgot the <code>Error reconnecting to the database This means that we lost contact with the database server at mysql:3306. This could mean your host’s database server is down. Are you sure the database server is running? Are you sure the database server is not under particularly heavy load? If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums</code> error from Wordpress if you wait till timeout.</p>
<p dir="auto">That's why it was so obvious that the SQL server was going down. <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f923.png?v=11345d81604" class="not-responsive emoji emoji-android emoji--rolling_on_the_floor_laughing" style="height:23px;width:auto;vertical-align:middle" title="🤣" alt="🤣" /></p>
]]></description><link>https://forum.cloudron.io/post/33320</link><guid isPermaLink="true">https://forum.cloudron.io/post/33320</guid><dc:creator><![CDATA[Lonkle]]></dc:creator><pubDate>Thu, 01 Jul 2021 19:00:42 GMT</pubDate></item><item><title><![CDATA[Reply to How do you diagnose PHP-based SQL problems? on Thu, 01 Jul 2021 18:56:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nebulon" aria-label="Profile: nebulon">@<bdi>nebulon</bdi></a> said in <a href="/post/33279">How do you diagnose PHP-based SQL problems?</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lonkle" aria-label="Profile: lonkle">@<bdi>lonkle</bdi></a> just to be on the same page, since this sounds far out with some plugin spawning a mysql process. The logs you have pasted earlier here, are those from the app or from the mysql service running in your Cloudron?</p>
</blockquote>
<p dir="auto">That is from the my SQL logs. I found out that's why the <strong>entire server</strong> would stop functioning for 5 minutes at a time - MySQL unexpectedly dies, retries, dies, retries, dies. I know it's gotta be a plugin. When you said it was spawning an SQL process somehow, I just ran with the idea since you're the expert but I realized that you just thought I was showing you app logs.</p>
<p dir="auto">I'v watched the app logs even during one of the random  MySQL deaths, and there's nothing on the logs except normal PHP stuff. I cleaned up all the notices and it still happens. I have <strong>ONE</strong> lead:</p>
<p dir="auto"><code>PHP Notice: Undefined offset: 1 in phar:///app/pkg/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1197) : eval()'d code on line 70</code></p>
<p dir="auto">I don't use the WP-CLI, which means it can only be that the <code>1 minute</code> cron job set up that sometimes runs into some huge task. Something is throwing an undefined offset in the Cron anyway. I'm hoping that's it. If I can find it. <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f605.png?v=11345d81604" class="not-responsive emoji emoji-android emoji--sweat_smile" style="height:23px;width:auto;vertical-align:middle" title="😅" alt="😅" /></p>
<p dir="auto">I'll have to time the next time it happens and see if it aligns with a cron job.</p>
]]></description><link>https://forum.cloudron.io/post/33319</link><guid isPermaLink="true">https://forum.cloudron.io/post/33319</guid><dc:creator><![CDATA[Lonkle]]></dc:creator><pubDate>Thu, 01 Jul 2021 18:56:12 GMT</pubDate></item><item><title><![CDATA[Reply to How do you diagnose PHP-based SQL problems? on Wed, 30 Jun 2021 18:14:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lonkle" aria-label="Profile: lonkle">@<bdi>lonkle</bdi></a> just to be on the same page, since this sounds far out with some plugin spawning a mysql process. The logs you have pasted earlier here, are those from the app or from the mysql service running in your Cloudron?</p>
]]></description><link>https://forum.cloudron.io/post/33279</link><guid isPermaLink="true">https://forum.cloudron.io/post/33279</guid><dc:creator><![CDATA[nebulon]]></dc:creator><pubDate>Wed, 30 Jun 2021 18:14:20 GMT</pubDate></item><item><title><![CDATA[Reply to How do you diagnose PHP-based SQL problems? on Wed, 30 Jun 2021 18:11:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> said in <a href="/post/33275">How do you diagnose PHP-based SQL problems?</a>:</p>
<blockquote>
<p dir="auto">Could be getting killed because it's running out of memory. Maybe you can bump the increase the memory limit of mysql service?</p>
</blockquote>
<p dir="auto">That's happened to me before but Cloudron always reports it and I adjust memory. Cloudron is reporting no memory limitations. But just in case, I set it really high IF that is the problem occurring.</p>
]]></description><link>https://forum.cloudron.io/post/33278</link><guid isPermaLink="true">https://forum.cloudron.io/post/33278</guid><dc:creator><![CDATA[Lonkle]]></dc:creator><pubDate>Wed, 30 Jun 2021 18:11:41 GMT</pubDate></item><item><title><![CDATA[Reply to How do you diagnose PHP-based SQL problems? on Wed, 30 Jun 2021 18:10:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nebulon" aria-label="Profile: nebulon">@<bdi>nebulon</bdi></a> Nope, not custom, it's your Wordpress (Developer) app. You're pointing me in the right direction tho - it's gotta be a plugin that, for some reason, is running its own instance of mysql.</p>
<p dir="auto">I personally don't get how or why it's 'spawning' the mysql process, waiting a second to say it succeeds and then dies in 5 minutes. 5 minutes must be some kind of timeout and there must be a conflict in the first place that killed mysql.</p>
<p dir="auto">Also weird that it eventually succeeds too.</p>
]]></description><link>https://forum.cloudron.io/post/33277</link><guid isPermaLink="true">https://forum.cloudron.io/post/33277</guid><dc:creator><![CDATA[Lonkle]]></dc:creator><pubDate>Wed, 30 Jun 2021 18:10:48 GMT</pubDate></item><item><title><![CDATA[Reply to How do you diagnose PHP-based SQL problems? on Wed, 30 Jun 2021 16:28:20 GMT]]></title><description><![CDATA[<p dir="auto">Could be getting killed because it's running out of memory. Maybe you can bump the increase the memory limit of mysql service?</p>
]]></description><link>https://forum.cloudron.io/post/33275</link><guid isPermaLink="true">https://forum.cloudron.io/post/33275</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Wed, 30 Jun 2021 16:28:20 GMT</pubDate></item><item><title><![CDATA[Reply to How do you diagnose PHP-based SQL problems? on Wed, 30 Jun 2021 10:41:37 GMT]]></title><description><![CDATA[<p dir="auto">Is this a custom app package? I wonder why there is a mysql instance running inside the app. On Cloudron it is recommended to use the mysql addon <a href="https://docs.cloudron.io/custom-apps/addons/#mysql" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.cloudron.io/custom-apps/addons/#mysql</a> instead.</p>
]]></description><link>https://forum.cloudron.io/post/33267</link><guid isPermaLink="true">https://forum.cloudron.io/post/33267</guid><dc:creator><![CDATA[nebulon]]></dc:creator><pubDate>Wed, 30 Jun 2021 10:41:37 GMT</pubDate></item><item><title><![CDATA[Reply to How do you diagnose PHP-based SQL problems? on Wed, 30 Jun 2021 04:00:52 GMT]]></title><description><![CDATA[<p dir="auto">Btw this is what the log looks like when I'm in there dev-ing. <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f605.png?v=11345d81604" class="not-responsive emoji emoji-android emoji--sweat_smile" style="height:23px;width:auto;vertical-align:middle" title="😅" alt="😅" /> But, that's a plugin thing I have no choice but to figure out.</p>
<p dir="auto"><img src="/assets/uploads/files/1625025649011-screen-shot-2021-06-29-at-11.57.52-pm-resized.jpg" alt="Screen Shot 2021-06-29 at 11.57.52 PM.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">I'm just astounded that it happened while the VPS wasn't being used at all which is why I'm posting.</p>
]]></description><link>https://forum.cloudron.io/post/33246</link><guid isPermaLink="true">https://forum.cloudron.io/post/33246</guid><dc:creator><![CDATA[Lonkle]]></dc:creator><pubDate>Wed, 30 Jun 2021 04:00:52 GMT</pubDate></item></channel></rss>