Skip to Content
Menu
This question has been flagged
2 Replies
3967 Views

OS: OpenBSD 6.3

Odoo: Odoo 11 CE & Python 3 (Server 1) + PostgreSQL (Server 2)


I wanted to get the longpolling started. I have this same error when I start "odoo-bin" either by setting "workers > 0" or using "python odoo-bin gevent".


Additional info, I have 2 servers, 1st server is holding Nginx + Odoo apps, while the 2nd server is holding the PostgreSQL database.


Error as per below:

Traceback (most recent call last):

    File "/odoo/odoo-bin", line 8, in <module>

        odoo.cli.main()

    File "/odoo/odoo/cli/command.py", line 60, in main

        o.run(args)

    File "/odoo/odoo/cli/server.py", line 175, in run

        main(args)

    File "/odoo/odoo/cli/server.py", line 169, in main

        rc = odoo.service.server.start(preload=preload, stop=stop)

    File "/odoo/odoo/service/server.py", line 991, in start

        rc = server.run(preload, stop)

    File "/odoo/odoo/service/server.py", line 391, in run

        self.start()

    File "/odoo/odoo/service/server.py", line 371, in start

        _, hard = resource.getrlimit(resource.RLIMIT_AS)

AttributeError: module 'resource' has no attribute 'RLIMIT_AS'

Thanks.

Avatar
Discard
Author

OK I found something interesting. It seems that although OpenBSD is also POSIX, but unlike FreeBSD, " RLIMIT_AS " system call is not yet implemented.

Reference: https://man.openbsd.org/setrlimit.2

So instead of getting the RLIMIT_AS, is there a workround for that, like hard-coding in the "server.py" code itself? Thanks.

Author Best Answer

Ok, as a temporary workaround, I've changed all instance of "RLIMIT_AS" in "odoo/service/server.py" to "RLIMIT_DATA" which or more of less similar. Now I can run odoo-bin with workers > 0 and/or gevent. Still testing this.


Which brings me to my original concern, getting the longpolling to work properly. But it will be another question I guess. Thanks.

Avatar
Discard
Related Posts Replies Views Activity
1
Mar 15
7740
0
Jul 21
3379
1
Apr 20
3112
0
Nov 17
3299
0
Jul 15
4172