unbit / uwsgi

uWSGI application server container
http://projects.unbit.it/uwsgi
Other
3.46k stars 691 forks source link

corerouter: "No space left on device" FreeBSD 11 #1464

Open ghost opened 7 years ago

ghost commented 7 years ago

Hi,

I'm seeing this quite a lot under a marginal workload. Maybe 3-4 requests per second.

This is my uwsgi launch line: /usr/local/bin/uwsgi -L -p 5 --limit-post 131072 --master --wsgi-file wsgi.py --http-to-https 0.0.0.0:80 --http-to-https [::]:80 --https [::]:443,ssl/chained.pem,ssl/domain.key --https :443,ssl/chained.pem,ssl/domain.key

I haven't found that error anywhere online. I'd appreciate any suggestions you can give me.

Thanks, Teran

xrmx commented 7 years ago

Well something is returin ENOSPC what, i don't know, but first check would be: do you have enough disk space?

unbit commented 7 years ago

Could it be the number of sysv locks/semaphores ?

http://uwsgi-docs.readthedocs.io/en/latest/ThingsToKnow.html

ghost commented 7 years ago

Thanks for getting back to me!

Plenty of disk space, both inodes and blocks. 2% and 9% utilised, respectively.

This specifically mentions FreeBSD 9 and newer as not having such issues:

On OpenBSD, NetBSD and FreeBSD < 9, SysV IPC semaphores are used as the locking subsystem. These operating systems tend to limit the number of allocable semaphores to fairly small values. You should raise the default limits if you plan to run more than one uWSGI instance. FreeBSD 9 has POSIX semaphores, so you do not need to bother with that.

This is on FreeBSD 11.

ipcs -p shows none currently in use.

# ipcs -p
Message Queues:
T           ID          KEY MODE        OWNER    GROUP           LSPID        LRPID

Shared Memory:
T           ID          KEY MODE        OWNER    GROUP            CPID         LPID

Semaphores:
T           ID          KEY MODE        OWNER    GROUP   

# 

And I have the semaphore settings at their defaults:

# ipcs -S
seminfo:
        semmni:           50    (# of semaphore identifiers)
        semmns:          340    (# of semaphores in system)
        semmnu:          150    (# of undo structures in system)
        semmsl:          340    (max # of semaphores per id)
        semopm:          100    (max # of operations per semop call)
        semume:           50    (max # of undo entries per process)
        semusz:          632    (size in bytes of undo structure)
        semvmx:        32767    (semaphore maximum value)
        semaem:        16384    (adjust on exit max value)

Using lsof, I don't see any semaphores in use by uwsgi, although I'm not certain what that would look like.

Thanks!

iredmail commented 6 years ago
kern.seminfo.semmni=1024
kern.seminfo.semmns=1200
kern.seminfo.semmnu=60
kern.seminfo.semmsl=120
kern.seminfo.semopm=200