Confluence temp process using 100% CPU
Asked by mickmcg:

Anyone know why this process would keep using 100% of 2 CPU cores.

```
/opt/atlassian/confluence/jre/bin/java -classpath /opt/atlassian/confluence/temp/2.1.0-master-9d112c9d.jar:/opt/atlassian/confluence/confluence/WEB-INF/lib/mysql-connector-java-5.1.33-bin.jar -Xss2048k -Xmx1g synchrony.core sql
```

I did a clean install of the latest 6.15 on Friday and imported content via XML export/import from a 6.1.1 Space.

Everything appears to be working fine from the frontend but our monitoring shows that this process uses 100% of 2 CPU cores continually.

You can't even kill it as it respawns with a new PID every 10-15s.


Answers:
author: Diego
body: Hello there!  
So Mick, performance issues can be caused by a number of reasons. Plugins, memory allocation, customization and drivers for example. This process looks like that it is coming from the *Database Connection Driver,* which is a lead as to what is affecting your instance. Which also explains *why it comes back* after being killed.

For starters, we could focus on the database driver version, Mick:
> mysql-connector-java-5.1.33-bin.jar

Currently, we tested Confluence with driver version 5.1.42 for MySQL and it looks like ++*we are using 5.1.33*++. It might be a good idea to start by changing the driver of your instance to the recommended one. This is an excerpt from our documentation:
> Confluence is currently tested with the 5.1.42 driver.  
> The latest driver (8.x) is not currently supported.

Here is the full page:

* **++*[Confluence Server - Database JDBC Drivers](https://confluence.atlassian.com/doc/database-jdbc-drivers-171742.html)*++**

Also, make sure that your MySQL database is Supported By Confluence 6.15.x. You can check this information right here:  

* ***++[Confluence Server - Supported Platforms for 6.15.x](https://confluence.atlassian.com/doc/supported-platforms-207488198.html)++***

<br />

For you to change the database driver we need to:
> 1. *Shtudown Confluence*
> 2. *Download the MySQL driver*
> 3. *Move or copy the \*.jar file into \<confluence-install\>/confluence/WEB-INF/lib directory*
> 4. *Start Confluence*
> 5. *Wait for the instance to start*
> 6. *Access Confluence*

Here is the link to the Driver, Mick:

***++[MySQL Connector - 5.1.42 Platform independent](https://downloads.mysql.com/archives/get/file/mysql-connector-java-5.1.42.zip)++***

***++Note:++***
> ++*Do Not Kill The Process, use the stop-confluence.sh script (stop-confluence.bat for windows). Killing the Confluence process can lead to instance corruption or malfunction after restart.*++

<br />

Hope this helps you! Looking forward to your reply.

comments: author: mickmcg
body: Thanks for the suggestions, Diego. I can report that the process did eventually stop using 100% without any changes at all but it took about 1.5 days.

Since then everything seems back to normal again.


author: Dmytro Pavlov
body: Hello [@Diego](/t5/user/viewprofilepage/user-id/1188952) we have same version of Confluence 6.15 and absolutely the same issue with 100% CPU usage even with latest mysql connector. In logs we see messages about OOM due to heap size, but it has already been increase from 1GB to 2GB. Any suggestions?

Thanks,


Tags: confluence-server

server