At work I was dwelling on uploading a big fat war file on websphere application server, and ended up facing perm gem space out of memory error. Finally I ended up finding out the solution to prevent this issue. Fire up your websphere web server and launch the administration console
Here navigate to Servers > Server types > Websphere Application servers and click on server1 or whatever it is named in your server
Here on the right menu find Server Infrastructure and click on Process definition
Here on the right side menu click on Java Virtual Machine
In this screen where we will set the heap size. For the sample configuration I have 8GB of ram at my work PC and I upload big war and ear files thus I have set Initial heap size 512MB and Maximum heap size 1024MB, this is up to you how much space you will assign to Websphere server
There is one more setting that I strongly suggest you to do is to disable garbage collection. This is optional.
When you are all good to go, you ran restart the server and start uploading big packages