You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by John Rinehart <jo...@gmail.com> on 2022/03/03 13:13:03 UTC
swap space not being used
I'm trying to build an application (dbeaver) on a VPS with limited physical
resources (~1GiB of RAM). To compensate I've set up 8GiB of swap space.
Trying to build dbeaver always results in a Java heap space error. None of
my swap is being used, though. I already tried to change the kernel
swappiness values to fix this, but it hasn't. Once the physical memory is
exhausted the build fails.
How can I ensure that swap space is used for maven builds?
-- John Rinehart
Re: swap space not being used
Posted by Bernd Eckenfels <ec...@zusammenkunft.net>.
Unless you use large pages java will automatically use all available virtual memory, maven does not change that.
Typically maven will start java launcher with default memory size, so maybe your problem is not related to your limited ram but a general java config? What is the exact memory error you get?
Gruss
Bernd
--
http://bernd.eckenfels.net
________________________________
Von: Nathan Fisher <na...@instana.com.INVALID>
Gesendet: Friday, March 4, 2022 5:53:45 PM
An: Maven Users List <us...@maven.apache.org>
Betreff: Re: swap space not being used
Is there a reason you wouldn't use a CI service like GitHub actions or
similar and then deploy the Artifact to the VPS? Or are you using the VPS
as a build server?
On Fri, Mar 4, 2022 at 10:25 AM John Rinehart <jo...@gmail.com>
wrote:
> I'm trying to build an application (dbeaver) on a VPS with limited physical
> resources (~1GiB of RAM). To compensate I've set up 8GiB of swap space.
> Trying to build dbeaver always results in a Java heap space error. None of
> my swap is being used, though. I already tried to change the kernel
> swappiness values to fix this, but it hasn't. Once the physical memory is
> exhausted the build fails.
>
> How can I ensure that swap space is used for maven builds?
>
> -- John Rinehart
>
--
Nathan Fisher
Computer Systems Analyst - Infrastructure Engineering Team
Instana Inc.
Re: swap space not being used
Posted by Nathan Fisher <na...@instana.com.INVALID>.
Is there a reason you wouldn't use a CI service like GitHub actions or
similar and then deploy the Artifact to the VPS? Or are you using the VPS
as a build server?
On Fri, Mar 4, 2022 at 10:25 AM John Rinehart <jo...@gmail.com>
wrote:
> I'm trying to build an application (dbeaver) on a VPS with limited physical
> resources (~1GiB of RAM). To compensate I've set up 8GiB of swap space.
> Trying to build dbeaver always results in a Java heap space error. None of
> my swap is being used, though. I already tried to change the kernel
> swappiness values to fix this, but it hasn't. Once the physical memory is
> exhausted the build fails.
>
> How can I ensure that swap space is used for maven builds?
>
> -- John Rinehart
>
--
Nathan Fisher
Computer Systems Analyst - Infrastructure Engineering Team
Instana Inc.
Re: swap space not being used
Posted by Thomas Matthijs <li...@selckin.be>.
You need to tell java it can use more memory then is available
For example for maven itself you can
# export MAVEN_OPTS=-Xmx2g
You don't really say what part of the build gives the error, could be maven itself, the java compiler, java process running the unit tests, many others, each of these may need different configuration to increase the allowed memory usage.
Regards
On Thu, Mar 3, 2022, at 14:13, John Rinehart wrote:
> I'm trying to build an application (dbeaver) on a VPS with limited physical
> resources (~1GiB of RAM). To compensate I've set up 8GiB of swap space.
> Trying to build dbeaver always results in a Java heap space error. None of
> my swap is being used, though. I already tried to change the kernel
> swappiness values to fix this, but it hasn't. Once the physical memory is
> exhausted the build fails.
>
> How can I ensure that swap space is used for maven builds?
>
> -- John Rinehart
>