API Queries peg VM CPU #9376
-
Good Morning. I first off apologize if I don't provide enough information initially, I've tried to compile what I think may be useful, but it's likely I've missed something important. I built a PHP interface using the API for some of our non-tech savvy supervisors to use to help simplify a few tasks they need to do before every shift. Before every shift, they assign users to locations, and check out assets to those users. I've also got another PHP page that queries the API every 30 seconds to display a "current status" of all assets in a particular category on a television. There are about 60 assets in that category. I've noticed that with any API query, the apache process on our ubuntu VM pegs the processor on our VM to 100, despite how many cores we give it. Put 3 or 4 supervisors interacting with the shift lineup page at once, combined with the 30 second poll of the current status page, and it makes the entire thing very slow and almost unusable. Looking at the apache access.log, I'm only seeing API GET requests from the web server hosting the php pages doing the polls, and I'm not seeing anything that indicates an accidental PHP loop sending more than necessary GET requests, as I'm only seeing a request every 30s on the status page, and then appropriate amount of traffic when interacting with the shift lineup. I notice zero affect to the standard snipeit interface while this is going on. Normal usage of the snipeit interface does not affect the apache process this way. I've enabled mysql slow query logging, and set the query time to 5 seconds, and nothing is showing in the log. Both PHP pages are hosted on an IIS webserver, and Snipeit is installed on an Ubuntu VM running 16.04. Snipeit version information is:
Didn't see anything in other discussions or bugs about this, so I'm posting something new. Hope that's OK. At a bit of a loss on troubleshooting at this point -- any direction is appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
Can you explain a little more about which API calls are pinning the CPU? What's the per-page limit on the API calls, how many items are you returning at one time, etc? Also have you tried upgrading to v5? |
Beta Was this translation helpful? Give feedback.
-
This issue resolved itself by an update to v5.1.5, the most current at the time of this posting. |
Beta Was this translation helpful? Give feedback.
This issue resolved itself by an update to v5.1.5, the most current at the time of this posting.