"error while loading plugins" "java heap space" while trying to view/install plugins
Asked by andrey dmitriev:

What param to tweak?

Been impossible to see/upgrade/install plugins lately.


Answers:
author: Wojciech Seliga
body: What Java memory settings your Confluence instance run with? If they the memory allocated for your JVM is not big (e.g. below 512MB for heap size and 256MB for permgen size), I would recommend increasing your heap memory (-Xmx settings by 100m or so) and your permgen size by 50m or so.See <http://confluence.atlassian.com/display/DOC/Fix+Out+of+Memory+Errors+by+Increasing+Available+Memory>It's also recommended to see if you have the latest version of Universal Plugin Manager and if not, upgrade it.

comments: author: Jeremy Largman
body: The error message specifically says heap, so it seems like heap space, but in general with plugin loading you see PermGen errors. make sure it's not this:

[http://confluence.atlassian.com/display/CONFKB/Confluence+Crashes+Due+to+%27java.lang.OutOfMemoryError+PermGen+space%27+Error](http://confluence.atlassian.com/display/CONFKB/Confluence+Crashes+Due+to+%2527java.lang.OutOfMemoryError+PermGen+space%2527+Error)


author: andrey dmitriev
body: our settings: -Xms256m -Xmx512m -XX:MaxPermSize=256m ..

How does one determine optimum size for these? We don't have that many users, but a relatively large set of plugins
\<th colspan="2" width="90%"\>Java VM Memory Statistics\</th\>

|---------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Heap Memory**                 | |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------| | |---------------------------------------------------------------------------------|---------------------------------------------------------------------------------| | ![](https://mt-adm.mentora.biz/confluence/s/1814/18/_/images/border/spacer.gif) | ![](https://mt-adm.mentora.biz/confluence/s/1814/18/_/images/border/spacer.gif) | | **16 % Free** | |
| **Maximum Heap Size**           | 488 MB                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **Total Allocated Memory**      | 488 MB                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **Used Memory**                 | 411 MB                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **Free Allocated Memory**       | 77 MB                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Total Free Memory**           | 77 MB                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Permanent Generation Memory** | |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------| | |---------------------------------------------------------------------------------|---------------------------------------------------------------------------------| | ![](https://mt-adm.mentora.biz/confluence/s/1814/18/_/images/border/spacer.gif) | ![](https://mt-adm.mentora.biz/confluence/s/1814/18/_/images/border/spacer.gif) | | **32 % Free** | |
| **Maximum PermGen**             | 256 MB                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| **Used PermGen**                | 174 MB                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |


author: Sheppe Pharis
body: Did you recently install or upgrade a plugin (UPM in particular)? I got this behavior after updating the Universal Plugin Manager to the latest version. I restored a backup and haven't had a problem since I've been avoiding that particular plugin upgrade.


author: Andrew Frayling
body: I normally set both -Xms1024m and -Xmx1024m. Setting minimum and maximum to the same value means the app server grabs 1GB for the heap and doesn't have to worry about resizing.


Tags: confluence-app