Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Have lots of free memory, but can not fork
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Have lots of free memory, but can not fork

I encountered a weird issue in my 1G RAM openvz VPS:

~ free -m total used free shared buffers cached Mem: 1024 359 664 0 0 109 -/+ buffers/cache: 250 773 Swap: 0 0 0

The vzfree output is nonsense:

~ sudo ./vzfree Total Used Free Kernel: 512.00M 22.52M 489.48M Allocate: 36028797018963968.00M 1362.25M 36028797018962604.00M (36028797018963967M Guaranteed) Commit: 36028797018963968.00M 286.02M 36028797018963968.00M (19.3% of Allocated) Swap: -95.13M (-36.1% of Committed)

But I can not fork, any fork, such as screen, apt-get, start-stop-daemon failed. Nothing interesting in the /etc/security/{limits.conf,limits.d} though.

I contacted the help desk, and they restarted the VPS, the issue still reproed.

At the end, I manually stopped some services, and the issue goes away. And I can restart the services, and the issue no longer repros.

Any idea what is going on here?

Comments

  • Try correcting your ulimit's.

  • if you have not changed the ulimit, then probably its due to the ulimit/pam limit's setting at your provider's side

  • For a second i thought this said free money and i got super excited.

  • @DamienSB said:
    For a second i thought this said free money and i got super excited.

    That would be:

    Have lots of money, but can not f**k.

  • @Rallias said:
    Try correcting your ulimit's.

    unlimited.

  • @wcypierre said:
    if you have not changed the ulimit, then probably its due to the ulimit/pam limit's setting at your provider's side

    It sounds plausible, but it is hard to explain why the fork succeeds after some processes are terminated and respawned.

  • Wait... how many processes do you have running?

    ps -Af | wc -l

  • @Rallias said:
    Wait... how many processes do you have running?

    ps -Af | wc -l

    46

  • @DamienSB said:
    For a second i thought this said free money and i got super excited.

    +1 :)

  • wcypierrewcypierre Member
    edited October 2013

    @bookstack said:

    and when you create up till 50 processes then the fork fails?
    fork will succeed when you terminate some processes as the internal count will be reduced by 1 * number of processes that you've terminated and as long as you don't reach the hard limit(actually, I had already had issues when I reached the soft limit, but I'll leave that for another day) then fork will work well.

Sign In or Register to comment.