PaperCut server using all the CPU?
Help me… My PaperCut server is using 100% of its resources!
Sometimes (just sometimes), we will receive a support ticket or Slack message about a customer with a server hosting PaperCut MF that uses a lot of the CPU and/or RAM. From the start, these things can often get tricky as nearly always the fault will lie with the customer’s server or network, and they (not unreasonably) want to blame the software rather than their fine hardware or network. So, we have to approach the problem sensitively; plus, there is always a matter of urgency with these things. While the server is going wild, this has a knock-on impact on the end-user’s experience with PaperCut MF.
Issues you may see:
- Slow/unresponsive reporting
- Delayed print popups
- Embedded solutions falling off the network
- Errors when accessing PaperCut Admin or User pages
- Scan failures
As you can see, software gets really unhappy when a server is slow… ever tried working off a stressed-out laptop? It’s much the same.
Basic questions
So, we like to start with a quick checklist of the basics.
- Is it CPU, memory, or both at a high utilisation?
- How is the customer monitoring this?
- Is there a particular process eating up the resources? For example, with PaperCut MF, it would be pc-app.exe.
- Are the resources slowly being consumed over a few days, or does it instantly spike to a high percentage? Does the usage go down at all? Or does it remain high?
- Does it happen regularly? Is there a pattern to this behaviour? For example, does it start to happen every Sunday night or Monday morning?
We would suggest that customers investigate setting up performance alerts on the server(s) early on so that an advanced warning is given when server resources become worrying. It may help them see a pattern.
As part of our research into the case, we suggest using the Health Monitoring API or installing PaperCut’s Multiverse service to monitor the server.
Once you check this, it helps us better understand the issue.
First thing to check
First of all, is it a virtual machine? If so – are the resources reserved? If not, reserve them and secondly, try increasing the resources available – throw a couple of extra CPU cores at the server and see if it helps. As a word of warning – do not go crazy on the memory. Too much memory is not always a good thing, this KB article is well worth a read.
Check if there are any anti-virus/malware scans regularly on the server.
Look to exclude the PaperCut install path from the real-time scan(s). Or, a more drastic step, stop the AV services completely. We do not suggest doing this forever, but we know the problem if it fixes the issue right away.
What other scheduled tasks have you got running?
For example, do you have some backups running on the server? Is it a VM, and you are backing up the host?
Do you have an external SQL server running? Are there any maintenance tasks running that could cause problems?
Talking of external SQL servers…
Could that SQL server be causing the issue? Maybe PaperCut is trying really hard to talk to the SQL server, and it can’t keep up with the requests. The knock-on impact of that delay/lag is causing the PaperCut server to work extra hard. So take all the advice we’ve discussed and apply it to the SQL server (check AV, resources, backups, network, etc.)
Oh, and be sure to be using the new SQL driver, PaperCut introduced an updated driver before version 20. Your connection string should look something like this: database.url=jdbc:sqlserver://serverName:portNumber;databaseName=databasename;socketTimeout=600000
Check user permissions
What user are you using for the service account for PaperCut MF? Is this user part of the local server’s Performance Log Users and Performance Monitor Users groups? It might be worth making sure they are a super admin to rule out any oddities with permissions.
What else is running?
Grab an export of the services on the configured PaperCut server(s) – something like this would be good.
Looking at that list may help you notice any other software interfering and disable any odd services you feel may be causing issues.
- Last of all, think about what changed recently?
- Did you update any drivers?
- Install new hardware?
- Replace hard drives?
- Install a proxy?
- Have you changed your hardware firewall?
A lot of the time, when it comes to high CPU, the issue lies outside of PaperCut. For example, we have seen new firewalls be installed and not fully configured. They then cause a delay/lag between the PaperCut App Server and database server, making both servers work harder and fall out of sync easily, which then causes the CPU spikes.)