OCA / connector

Odoo generic connector framework (jobs queue, asynchronous tasks, channels)
GNU Affero General Public License v3.0
340 stars 442 forks source link

[8.0] AttributeError: 'PreforkServer' object has no attribute 'jobrunner' #306

Closed azeemism closed 2 years ago

azeemism commented 6 years ago

Starting the server with

DAEMON_ARGS="-c ${CONFIG} -u all -d erp-server-com" after updating the connector to

https://github.com/OCA/connector/commit/13412806e24e57a74268c527ba726320424e055f

result in the following error:

2018-09-06 02:43:44,960 61370 DEBUG erp-server-com openerp.fields: Field product.pricelist.version.tmpl_in_count is recursively defined
2018-09-06 02:43:44,962 61370 INFO erp-server-com openerp.modules.module: module rma: creating or updating database tables
2018-09-06 02:43:44,986 61370 INFO erp-server-com openerp.modules.loading: 344 modules loaded in 473.97s, 20 queries
2018-09-06 02:43:46,290 61370 DEBUG erp-server-com openerp.fields: Field product.pricelist.version.tmpl_in_count is recursively defined
2018-09-06 02:43:46,333 61370 DEBUG erp-server-com openerp.models: column web is in the table ir_module_module but not in the corresponding object ir.module.module
2018-09-06 02:43:46,349 61370 DEBUG erp-server-com openerp.models: column original_creditor_identifier is in the table res_company but not in the corresponding object res.company
2018-09-06 02:43:46,497 61370 DEBUG erp-server-com openerp.models: column dest_address_id is in the table purchase_report but not in the corresponding object purchase.report
2018-09-06 02:43:46,505 61370 DEBUG erp-server-com openerp.models: column image_medium is in the table hr_employee but not in the corresponding object hr.employee
2018-09-06 02:43:46,505 61370 DEBUG erp-server-com openerp.models: column image_small is in the table hr_employee but not in the corresponding object hr.employee
2018-09-06 02:43:46,511 61370 DEBUG erp-server-com openerp.models: column currency_id is in the table hr_timesheet_report but not in the corresponding object hr.timesheet.report
2018-09-06 02:43:46,602 61370 DEBUG erp-server-com openerp.models: column nbr is in the table hr_recruitment_report but not in the corresponding object hr.recruitment.report
2018-09-06 02:43:46,618 61370 DEBUG erp-server-com openerp.models: column original_creditor_identifier is in the table payment_mode but not in the corresponding object payment.mode
2018-09-06 02:43:46,627 61370 DEBUG erp-server-com openerp.models: column sepa_migrated is in the table account_banking_mandate but not in the corresponding object account.banking.mandate
2018-09-06 02:43:46,627 61370 DEBUG erp-server-com openerp.models: column original_mandate_identification is in the table account_banking_mandate but not in the corresponding object account.banking.mandate
2018-09-06 02:43:46,665 61370 DEBUG erp-server-com openerp.models: column dest_address_id is in the table purchase_stock_analysis but not in the corresponding object purchase.stock.analysis
2018-09-06 02:43:47,199 61370 INFO erp-server-com openerp.modules.loading: Modules loaded.
2018-09-06 02:43:47,217 61370 INFO erp-server-com openerp.models: Computing parent left and right for table ir_ui_menu...
2018-09-06 02:43:47,453 61370 INFO erp-server-com openerp.modules.registry: Registry changed, signaling through the database
2018-09-06 02:43:47,454 61370 INFO erp-server-com openerp.sql_db: ConnectionPool(used=0/count=0/max=64): Closed 2 connections
2018-09-06 02:43:47,454 61370 DEBUG erp-server-com openerp.service.server: Multiprocess starting
2018-09-06 02:43:47,458 61561 INFO erp-server-com openerp.service.server: Worker WorkerHTTP (61561) alive
2018-09-06 02:43:47,460 61562 INFO erp-server-com openerp.service.server: Worker WorkerHTTP (61562) alive
2018-09-06 02:43:47,462 61563 INFO erp-server-com openerp.service.server: Worker WorkerHTTP (61563) alive
2018-09-06 02:43:47,464 61564 INFO erp-server-com openerp.service.server: Worker WorkerHTTP (61564) alive
2018-09-06 02:43:47,467 61565 INFO erp-server-com openerp.service.server: Worker WorkerHTTP (61565) alive
2018-09-06 02:43:47,469 61566 INFO erp-server-com openerp.service.server: Worker WorkerHTTP (61566) alive
2018-09-06 02:43:47,471 61567 INFO erp-server-com openerp.service.server: Worker WorkerHTTP (61567) alive
2018-09-06 02:43:47,473 61568 INFO erp-server-com openerp.service.server: Worker WorkerHTTP (61568) alive
2018-09-06 02:43:47,475 61569 INFO erp-server-com openerp.service.server: Worker WorkerHTTP (61569) alive
2018-09-06 02:43:47,478 61570 INFO erp-server-com openerp.service.server: Worker WorkerHTTP (61570) alive
2018-09-06 02:43:47,480 61571 INFO erp-server-com openerp.service.server: Worker WorkerHTTP (61571) alive
2018-09-06 02:43:47,482 61572 INFO erp-server-com openerp.service.server: Worker WorkerHTTP (61572) alive
2018-09-06 02:43:47,485 61573 INFO erp-server-com openerp.service.server: Worker WorkerHTTP (61573) alive
2018-09-06 02:43:47,487 61574 INFO erp-server-com openerp.service.server: Worker WorkerHTTP (61574) alive
2018-09-06 02:43:47,489 61575 INFO erp-server-com openerp.service.server: Worker WorkerHTTP (61575) alive
2018-09-06 02:43:47,491 61576 INFO erp-server-com openerp.service.server: Worker WorkerHTTP (61576) alive
2018-09-06 02:43:47,499 61578 INFO erp-server-com openerp.service.server: Worker WorkerCron (61578) alive
2018-09-06 02:43:47,501 61579 INFO erp-server-com openerp.service.server: Worker WorkerCron (61579) alive
2018-09-06 02:43:47,504 61580 INFO erp-server-com openerp.service.server: Worker WorkerCron (61580) alive
2018-09-06 02:43:47,506 61581 INFO erp-server-com openerp.service.server: Worker WorkerCron (61581) alive
2018-09-06 02:43:47,508 61582 INFO erp-server-com openerp.service.server: Worker WorkerCron (61582) alive
2018-09-06 02:43:47,511 61583 INFO erp-server-com openerp.service.server: Worker WorkerCron (61583) alive
2018-09-06 02:43:47,511 61370 ERROR erp-server-com openerp.service.server: 'PreforkServer' object has no attribute 'jobrunner'
Traceback (most recent call last):
  File "/opt/odoo/oca80/openerp/service/server.py", line 663, in run
    self.process_spawn()
  File "/opt/odoo/oca80/addons-oca/connector/connector/jobrunner/__init__.py", line 107, in prefork_process_spawn
    if not server.jobrunner and _channels():
AttributeError: 'PreforkServer' object has no attribute 'jobrunner'
2018-09-06 02:43:47,512 61370 INFO erp-server-com openerp.service.server: Stopping forcefully

This may be related to #288 or #302.

Am I supposed to add something to my server config file to avoid this issue? If so what exactly do I need to do?

[options]

;;; Sources
; http://antiun.github.io/odoo-reverse-proxy-howto/#slide-71
; http://www.schenkels.nl/2014/12/reverse-proxy-with-odoo-8-nginx-ubuntu-14-04-lts/
; http://stackoverflow.com/questions/35770332/is-possible-to-use-ssl-in-odoo-with-nginx-avoiding-the-standard-ports-80-and-44
; http://www.tecmint.com/install-openerp-odoo-with-nginx-on-centos-and-debian/

;;; STARTUP OPTIONS

; Admin password for creating, restoring and backing up databases
admin_passwd = secretpassword

; specify addons paths (separated by commas with no spaces)
; Without geospatial (default to use - since there are issues with installing postgis)
; Added: management-system, account-payment, account-invoicing, account-budgeting, account-invoice-reporting etc
addons_path = /opt/odoo/oca80/addons,/opt/odoo/oca80/addons-custom/aeroo_reports,/opt/odoo/oca80/addons-custom/debrand_rebrand,/opt/odoo/oca80/addons-oca/account-analytic,/opt/odoo/oca80/addons-oca/account-budgeting,/opt/odoo/oca80/addons-oca/account-closing,/opt/odoo/oca80/addons-oca/account-financial-reporting,/opt/odoo/oca80/addons-oca/account-financial-tools,/opt/odoo/oca80/addons-oca/account-fiscal-rule,/opt/odoo/oca80/addons-oca/account-invoice-reporting,/opt/odoo/oca80/addons-oca/account-invoicing,/opt/odoo/oca80/addons-oca/account-payment,/opt/odoo/oca80/addons-oca/bank-payment,/opt/odoo/oca80/addons-oca/bank-statement-import,/opt/odoo/oca80/addons-oca/bank-statement-reconcile,/opt/odoo/oca80/addons-oca/carrier-delivery,/opt/odoo/oca80/addons-oca/community-data-files,/opt/odoo/oca80/addons-oca/connector,/opt/odoo/oca80/addons-oca/connector-ecommerce,/opt/odoo/oca80/addons-oca/connector-interfaces,/opt/odoo/oca80/addons-oca/connector-magento,/opt/odoo/oca80/addons-oca/crm,/opt/odoo/oca80/addons-oca/e-commerce,/opt/odoo/oca80/addons-oca/hr,/opt/odoo/oca80/addons-oca/hr-timesheet,/opt/odoo/oca80/addons-oca/knowledge,/opt/odoo/oca80/addons-oca/l10n-canada,/opt/odoo/oca80/addons-oca/management-system,/opt/odoo/oca80/addons-oca/margin-analysis,/opt/odoo/oca80/addons-oca/mis-builder,/opt/odoo/oca80/addons-oca/partner-contact,/opt/odoo/oca80/addons-oca/pos,/opt/odoo/oca80/addons-oca/product-attribute,/opt/odoo/oca80/addons-oca/project,/opt/odoo/oca80/addons-oca/purchase-reporting,/opt/odoo/oca80/addons-oca/purchase-workflow,/opt/odoo/oca80/addons-oca/reporting-engine,/opt/odoo/oca80/addons-oca/report-print-send,/opt/odoo/oca80/addons-oca/rma,/opt/odoo/oca80/addons-oca/sale-workflow,/opt/odoo/oca80/addons-oca/server-tools,/opt/odoo/oca80/addons-oca/social,/opt/odoo/oca80/addons-oca/stock-logistics-barcode,/opt/odoo/oca80/addons-oca/stock-logistics-reporting,/opt/odoo/oca80/addons-oca/stock-logistics-tracking,/opt/odoo/oca80/addons-oca/stock-logistics-transport,/opt/odoo/oca80/addons-oca/stock-logistics-warehouse,/opt/odoo/oca80/addons-oca/stock-logistics-workflow,/opt/odoo/oca80/addons-oca/web,/opt/odoo/oca80/addons-oca/webkit-tools,/opt/odoo/oca80/addons-private/webkul

; disable loading demo data for modules to be installed (comma-separated, use “all” for all modules, use "False" as opposite of "all")
;without_demo = False

;;; DATABASE OPTIONS

; specify the database host
db_host = localhost

; specify the database port
db_port = 5432
;db_port = False

; specify the database user name
db_user = oca80

; specify the database password
db_password = secretpassword

; specify the database name (value: False, ...)
;db_name = erp-server-com

; specify the the maximum number of physical connections to posgresql
;db_maxconn = 64

; specify postgresql path
;pg_path = /usr/lib/postgresql/9.5/bin

; Use this for big data importation, if it crashes you will be able to continue at the current state. Provide a filename to store intermediate importation states. The file that you provide is the name of the file to dump the remaining records that were not imported once the failure occurred, so you won't have to import all of the initial, good records again until you solve every problem in the entire import.
;;import_partial = remaining-records.dump

;;; Data
;
; https://www.odoo.com/groups/community-59/community-10696414
;
; Attachment are stored oustide the database by default in v8 in
;
; $DATADIR/filestore//
;
; They are named as sha1 hash (almost like git objetcs).
;
; Under Linux or any other freedesktop compliant distribution the data is
; $Odoo_HOME/.local/Odoo/share/filestore/database_name and can be override with command option --data-dir=
;
; For ftp access i recommend that you use the document_fs
;
; https://github.com/odoo/odoo-extra/tree/master/document_fs
;
; If sync back from ftp to ir.attachment you need to execute _document_fs_sync
; from a cron job or as post logout script from the ftp server.
;
; https://www.odoo.com/forum/help-1/question/ir-attachment-location-for-v8-45571
;
; In that path, odoo will create folders: addons, filestore and session
; In filestore odoo server will create a new folder for each database,  and in each database,
; in table ir_attachment will be stored path relative to /path/to/desired/Odoo/filestore/db_name ... to actual file...
; This folder will contain all attachments (from backend, and also all website materials like pictures etc...)
;
; https://www.odoo.com/forum/help-1/question/where-are-document-attachments-stored-529
; https://www.odoo.com/forum/help-1/question/document-ftp-for-odoo-8-77485

;data_dir = /opt/odoo/oca80/.local/share/Odoo
;data_dir = /var/lib/oca80

;;; Resolve calls to external binaries served in the thirdparty dir
;
; Financial Reports - Webkit (account_financial_report_webkit) may need
; this to locate wkhtmltopdf
bin_path = /usr/bin
;bin_path = /usr/bin/wkhtmltopdf

;;; WEB – WEB INTERFACE OPTIONS (ALSO ADD TO STRATUP OPTIONS)

; Filter listed database REGEXP
;dbfilter = .*

; Covers the hostname
; DB filtering for multi-site instances
dbfilter=^%h$

; Covers the hostname.domainname.com
;dbfilter=^%d$

;dbfilter=erp-server-com

;;; SECUTIRY OPTIONS

; disable the ability to return the list of databases
list_db = True

;;; Proxy Settings

; enable correct behavior when behind a reverse proxy (True / False)
proxy_mode = True
;proxy_mode = 1

;;; XML-RPC / HTTP – XML-RPC OPTIONS

; enable the XML-RPC protocol (Activate HTTP)
;xmlrpc = True

; specify the TCP IP address for the XML-RPC protocol. The empty string binds to all interfaces (possibly "0.0.0.0" or empty). Block non-encripted services from the outside world. Set to prevent  errors when loading the web service
; configure the openerp server so that non-encrypted services are not accessible from the outside world.
; http://www.schenkels.nl/2014/12/reverse-proxy-with-odoo-8-nginx-ubuntu-14-04-lts/
xmlrpc_interface =  127.0.0.1

; specify the TCP port for the XML-RPC protocol
;xmlrpc_port = 8069
xmlrpc_port = 5082

;;; IM / LONGPOLLING OPTIONS
; NOTE: For longpolling to start multi-processing mode must be started workers = greate than one
; possibly error message bellow results from not having enough workers
; [error] 5593#5593: *320 connect() failed (111: Connection refused) while connecting to upstream, client: 24.80.61.99, server: erp.server.com, request: "POST /longpolling/poll HTTP/1.1", upstream: "http://127.0.0.1:5182/longpolling/poll", host: "erp.server.com", referrer: "https://erp.server.com/web?"

; enable longpolling
;longpolling = True

; specify TCP IP address
; NOTE: previously had this enabled but trying to set longpolling is not working
longpolling_interface = 127.0.0.1

; specify TCP port for longpolling
;longpolling_port = 8072
longpolling_port = 5182

;;; XML-RPCS / HTTPS – XML-RPC SECURE OPTIONS

; enable the XML-RPC Secure protocol (Activate HTTPS)
; NOTE: previously set to false, but now commented,  trying to enable longpolling
;xmlrpcs = False
;xmlrpcs = True

; Specify the TCP IP address for the XML-RPC Secure protocol. The empty string binds to all interfaces.
; NOTE: previously enable, but trying to enable longpolling
;xmlrpcs_interface = 127.0.0.1

; specify the TCP port for the XML-RPC Secure protocol
;xmlrpcs_port = 8071
xmlrpcs_port = 5382

; specify the certificate file for the SSL connection
;secure_cert_file = /etc/ssl/odoo/self/odoo.4096.crt

; specify the private key file for the SSL connection
;secure_pkey_file = /etc/ssl/odoo/self/odoo.4096.key

;;; NET-RPC – NET-RPC OPTIONS

; enable the NETRPC protocol
; NOTE: previously set to false, but now commented, to try to get longpolling to work
;netrpc = False
;netrpc = True

; specify the TCP IP address for the NETRPC protocol
# configure the openerp server so that non-encrypted services are not accessible from the outside world.
# http://www.schenkels.nl/2014/12/reverse-proxy-with-odoo-8-nginx-ubuntu-14-04-lts/
netrpc_interface = 127.0.0.1

; specify the TCP port for the NETRPC protocol
;netrpc_port = 8070
netrpc_port = 5282

;;; STATIC HTTP OPTIONS

; enable static HTTP service for serving plain HTML files
static_http_enable = False

; specify the directory containing your static HTML files (e.g '/var/www/')
static_http_document_root = None

; specify the URL root prefix where you want web browsers to access your static HTML files (e.g '/')
static_http_url_prefix = None

;;; Testing Group - Testing Configuration
; Launch a YML test file.
test_file = False
; If set, will save sample of all reports in this directory.
test_report_directory = False
; Enable YAML and unit tests.
test_disable = False
; Commit database changes performed by YAML or XML tests.
test_commit = False

;;; SMTP OPTIONS

; specify the SMTP email address for sending email
;email_from = False

; specify the SMTP server for sending email
;smtp_server = localhost

; specify the SMTP port
;smtp_port = 25

; specify the SMTP server support SSL or not
;smtp_ssl = False

; specify the SMTP username for sending email
;smtp_user = False

; specify the SMTP password for sending email
;smtp_password = False

;;; FORMAT OPTIONS

; default CSV separator for import and export
csv_internal_sep = ,

; to compress reports
;reportgz = False

;;; INTERNATIONALISATION OPTIONS

; enable module translation
;translate_modules = ['all']

;;; LOGGING OPTIONS

; file where the server log will be stored
logfile = /var/log/odoo/oca80/oca80-server.log
; do not rotate the logfile
logrotate = True

; Send the log to the syslog server
syslog = False

; setup a handler at LEVEL for a given PREFIX. An empty PREFIX indicates the root logger. This option can be repeated. Example: "openerp.orm:DEBUG" or "werkzeug:CRITICAL" (default: ":INFO")
;log_handler = [':INFO']
log_handler=odoo.addons.queue_job:DEBUG

; specify the level of the logging. Accepted values: info, debug_rpc, warn, test, critical, debug_sql, error, debug, debug_rpc_answer, notset
log_level = debug
;;log_level = info
;log_level = warn
;;log_level = error

;;; ADVANCED OPTIONS

; enable debug mode
;debug_mode = False

; specify reference timezone for the server (e.g. Europe/Brussels")
; In the back-end however all dates are converted to UTC-now times,
; so that the database uses the same timezone for all date and time handling.
; no need for this setting
;timezone = Canada/Pacific

; file where the server pid will be stored (should be in init.d config)
;pidfile = None

; Use the unaccent function provided by the database when available.
;unaccent = False

;;; MULTIPROCESSING OPTIONS

;-----------------------------------------------------------------------------
; Specify the number of workers, 0 disable prefork mode.
; if count is not 0 , enables multiprocessing and sets up the
; specified number of HTTP workers (sub-processes processing HTTP and RPC
; requests). TKL Default is 0
; NOTE: Usually set to number of cores + 1 but each worker can use value of limit-memory-soft
; NOTE: Setting this value seems to create server spikes not sure if this is a flaw or acceptable.
; NOTE: This seems to have corrected itself, possibly after a code update
; NOTE: multiprocessing mode is require in order for the longpolling service to start
;       so "workers" have to be "greate than 1"
; NOTE: previouly using 7, but this limits number of web pages I have open
; NOTE: New calc 16 cpu server with 32 gigs (100+ users): 9 workers * 4 = 36
; NOTE: Leaving commented for now to prevent server spikes, would otherwise set to 9
;-----------------------------------------------------------------------------
;
;
;;workers = 2
;;workers = 4
;;workers = 6
;;workers = 7
;;workers = 9
;;workers = 10
;
;;workers = 36
;;workers = 9
workers = 16
;
; Opened two issues with high CPU resulting from all modules loading as every start job for
;     AutoVacuum osv_memory objects
;     Run Event Reminder
;     Email Queue Manager
;     Run Clean empty surveys
;     Update Printers Status
;         - base_report_to_printer
;         - printer_tray
;
;https://github.com/odoo/odoo/issues/13449
;https://github.com/OCA/report-print-send/issues/57

;-----------------------------------------------------------------------------
; Number of workers dedicated to cron jobs. Defaults to 2.
; The workers are threads in multithreading mode and processes in multiprocessing mode.
; For multiprocessing mode, this is in addition to the HTTP worker processes.
; NOTE: using 5 before
; NOTE: New calc 16 cpu server with 32 gigs (100+ users): 3 threads * 4 = 12
;-----------------------------------------------------------------------------
;
;max_cron_threads = 2
;max_cron_threads = 3
;max_cron_threads = 4
;max_cron_threads = 5
;
;max_cron_threads = 12
;max_cron_threads = 3
max_cron_threads = 6

;-----------------------------------------------------------------------------
; Maximum allowed virtual memory per worker.
; If the limit is exceeded, the worker is killed and recycled at the end of the current request.
; Defaults to 640MB or 671088640 set in bytes.
; ...so 9 + 3 = 11 * 640 = 7680 MB or 7.5 GB max memory usage
; ...so 36 + 12 = 48 * 640 = 30720 MB or 30 GB max memory usage
;-----------------------------------------------------------------------------
;
limit_memory_soft = 671088640

;-----------------------------------------------------------------------------
; Hard limit on virtual memory, any worker exceeding the limit will be immediately killed
; without waiting for the end of the current request processing.
; Defaults to 768MB or 805306368 set in bytes.
; (TLK): Not sure of the reason but if this is set lower that 1.3GB then print jobs
; using PDF does not work. We are unsure why but this was the lowest amount
; for it to work.
;
;limit_memory_hard = 805306368
;limit_memory_hard = 1610612736
;limit_memory_hard = 1395864371
limit_memory_hard = 1476395008

;-----------------------------------------------------------------------------
; Prevents the worker from using more than <limit> CPU seconds for each
; request. If the limit is exceeded, the worker is killed. Set in seconds.
; Default = 60
;-----------------------------------------------------------------------------
;
;limit_time_cpu = 86400
;limit_time_cpu = 3600
;limit_time_cpu = 60
;limit_time_cpu = 120
;limit_time_cpu = 240
limit_time_cpu = 1800

;-----------------------------------------------------------------------------
; Prevents the worker from taking longer than <limit> seconds to process a
; request. If the limit is exceeded, the worker is killed. Set in seconds.
; Differs from --limit-time-cpu in that this is a "wall time" limit including e.g. SQL queries.
; Default = 120
;-----------------------------------------------------------------------------
;
;limit_time_real = 86400
;limit_time_real = 3600
;limit_time_real = 120
;limit_time_real = 170
;limit_time_real = 300
;limit_time_real = 600
limit_time_real = 1800

;-----------------------------------------------------------------------------
; Number of requests a worker will process before being recycled and restarted.
;-----------------------------------------------------------------------------
;
;limit_request = 8196
;limit_request = 16392
limit_request = 32784

;-----------------------------------------------------------------------------
; Force a limit on the maximum number of records kept in the virtual osv_memory
; tables. The default is False, which means no count-based limit.
;-----------------------------------------------------------------------------
;
osv_memory_count_limit = False

;-----------------------------------------------------------------------------
; Force a limit on the maximum age of records kept in the virtual osv_memory
; tables. This is a decimal value expressed in hours, and the default is 1 hour.
;-----------------------------------------------------------------------------
;
osv_memory_age_limit = 1.0

;#HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
;# Tuning Options
;# https://github.com/DocCyblade/tkl-odoo/blob/master/overlay/etc/odoo/openerp-server.conf
;# https://books.google.ca/books?id=Kv7fDAAAQBAJ&pg=PA353&lpg=PA353&dq=%2B%22odoo%22+%2B%22tuning%22+%2B%22limit_time_cpu%22+%2B%22limit_time_real%22&source=bl&ots=jGWf3vukqI&sig=SnmSP0TppKhh1Sw4H3ba3A0OI2w&hl=en&sa=X&ved=0ahUKEwicp7nsvN_OAhVGzGMKHQY5DskQ6AEINTAD#v=onepage&q=%2B%22odoo%22%20%2B%22tuning%22%20%2B%22limit_time_cpu%22%20%2B%22limit_time_real%22&f=false
;# http://stackoverflow.com/questions/35918633/what-is-the-worker-in-odoo
;#HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
;#-----------------------------------------------------------------------------
;# A word on tuning your Odoo Server
;#-----------------------------------------------------------------------------
;#
;# A lot of time has gone in to testing this TKL appliance, and one thing we
;# learned while testing was tuning. For all the why we chose these numbers you
;# can take a look at he issues on GitHub (links at the botton of this article)
;#
;# Most of this text here was taken from the Memory Matrix Discussion
;# https://github.com/DocCyblade/tkl-odoo/issues/49#issuecomment-148881166
;#
;# It is important to note that you can run Odoo in threaded mode by setting
;# the workers option to 0 however there are some modules that won't work
;# and you loose fine grain control of resource management.
;#
;#-----------------------------------------------------------------------------
;#
;# the --workers is how many new process will be started to perform work or
;# (answer requests) The workers have limits upon them set by the limit_xxxxx
;# options here in the config file.
;#
;# The "limit_memory_soft" limit is the amount of ram that when a process
;# goes over this limit after it is done with the request it is terminated
;# and the memory it was using is freed. This amount goes for each process
;#
;# The hard limit is the amount of ram that if the process goes over it,
;# it WILL terminate right then. (I don't think this is really correct
;# because of the PDF issue we had and set this to 1.3 GB and never
;# saw a process take this much. but if its below 1.3GB PDF are not created)
;#
;# The one we need to pay attention to is the limit_memory_soft.
;# As these workers will stay alive and hold on to memory until that limit
;# is reached. So if you have 5 workers and the soft limit is 256MB you could
;# end up with 5 workers each taking 256MB that's 1.25GB of RAM that could
;# be taken up. If you only had 1GB of ram you may need to dial back your
;# workers or your soft limit.
;#
;# It's a balancing act of sorts, I am also not sure if keeping the
;# workers at say 350 or 400 if there is some caching effect. Not sure
;# why it's holding on to the memory.
;#
;#-----------------------------------------------------------------------------
;#
;# Hardware Matrix for recommended values:
;#   (Note these are for REAL hardware, Virtual Hardware has it's own
;#     issues that can arise with too many guest on a host with too many
;#     CPU cores etc, so remember that when looking at the chart below)
;#   (One other note that when I tested these, I did use VMware but
;#     no other VMs where competing for resources)
;#   (One last note, really. These numbers are to show the relationship
;#     between the config settings and hardware. We also assume you are running
;#     the database server on the same server. I know at some point in the
;#     higher numbers that this would not be the case. These are not numbers
;#     set in stone nor numbers gotten from Odoo. These are numbers I have
;#     come up with from the testing I have done. Real world examples if you
;#     have them would be great and these numbers can and should be updated!
;#
;# Heading            | Description
;# ------------------ | ---------------------------------------------------------
;# CPUs               | Number of CPU Cores not threads
;# Physical           | Physical memory, not virtual or swap
;# workers            | Number of workers specified in config file (workers = x)
;# cron               | Number of workers for cron jobs (max_cron_threads = xx)
;# Mem Per            | Memory in MB that is the max memory for request per worker
;# Max Mem            | Maximum amount that can be used by all workers
;# limit_memory_soft  | Number in bytes that you will use for this setting
;#
;# Note: Max Memory if notice is less than total memory this is on purpose. As
;#       workers process requests they can grow beyond the Mem Per limit so a
;#       server under heavy load could go past this amount. This is why there
;#       is "head room" built in.
;#
;# CPUs | Physical | workers | cron | Mem Per | Max Mem | limit_memory_soft
;# ---- | -------- | ------- | ---- | ------- | ------- | -----------------------
;# ANY  | =< 256MB |    NR   |  NR  |      NR |     NR  | NR
;#  1   |   512MB  |    0    |  N/A |     N/A |     N/A | N/A
;#  1   |   512MB  |    1    |  1   |   177MB |   354MB | 185127901
;#  1   |    1GB   |    2    |  1   |   244MB |   732MB | 255652815
;#  1   |    2GB   |    2    |  1   |   506MB |  1518MB | 530242876
;#  2   |    1GB   |    3    |  1   |   183MB |   732MB | 191739611
;#  2   |    2GB   |    5    |  2   |   217MB |  1519MB | 227246947
;#  2   |    4GB   |    5    |  2   |   450MB |  3150MB | 471974428
;#  4   |    2GB   |    5    |  2   |   217MB |  1519MB | 227246947
;#  4   |    4GB   |    9    |  2   |   286MB |  3146MB | 300347363
;#  4   |    8GB   |    9    |  3   |   546MB |  6552MB | 572662306
;#  4   |    16GB  |    9    |  3   |  1187MB | 14244MB | 1244918057
;#
;#
;#-----------------------------------------------------------------------------
;#
;# Calculations on how we got the above chart and other info can be found
;#
;# Memory Matrix Discussion
;#   https://github.com/DocCyblade/tkl-odoo/issues/49
;#
;# Shakedown Testing Discussions
;#   https://github.com/DocCyblade/tkl-odoo/issues/52
;#   https://github.com/DocCyblade/tkl-odoo/issues/53
;#   https://github.com/DocCyblade/tkl-odoo/issues/54
;#   https://github.com/DocCyblade/tkl-odoo/issues/55
;#
;#-----------------------------------------------------------------------------

; http://stackoverflow.com/questions/35918633/what-is-the-worker-in-odoo
;
; You should use 2 worker threads + 1 cron thread per available CPU,
; and 1 CPU per 10 concurent users. Make sure you tune the memory limits and cpu
; limits in your configuration file.

;http://odoo.com.au/recommended-server-specifications-for-odoo/
;Requirements for running Odoo 9 Community and Enterprise are the same.
;
;For a 5 user site = 2 CPU server and 2 GB Ram
;
;For 20 user site = 4 CPU server and 8 GB Ram
;
;For 100+ user site = recommend splitting app and database servers, 2 x 8 CPU servers with 32 GB Ram

;http://stackoverflow.com/questions/31177905/reason-why-odoo-being-slow-when-there-is-huge-data-inside-the-database
;http://stackoverflow.com/questions/35916177/resolved-high-idle-load-in-odoo-openerp-when-using-multiple-worker-processes
;http://www.slideshare.net/openobject/performance2014-35689113
;https://www.odoo.com/forum/help-1/question/largest-openerp-database-size-and-openerp-version-14799
;https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server
;http://www.slideshare.net/openobject/tips-on-how-to-improve-the-performance-of-your-custom-modules-for-high-volumes-deployment-olivier-dony-open-erp?next_slideshow=1

;Tuning
;https://github.com/citec/docker-compose-odoo/blob/master/setupfiles/odoo.conf
;http://openerp136.rssing.com/browser.php?indx=9199578&item=5458

; more options available see /opt/odoo/oca80/openerp/tools/config.py

If I do get Odoo started, I am also unable to login from erp.server.com as when I load the url it automatically transports me to https://erp.server.com/web/database/manager#action=database_manager

Thanks for your support.

azeemism commented 6 years ago

UPDATE: I am no longer certain if this is an issue.

I was unable to login to the Odoo server, and the only error I found in the log was related to the OCA/connector. As it turned out, I didn't have connector installed or setup to use jobrunner, but I keep the module updated and it is in the addons_path of my odoo-server.conf file. I would expect that if the module in not installed or setup to use jobrunner, the error should not appear in the log.

After rolling back all updates it turned out that I was unable to check/login to the server because of, OCA/OCB#778 that required an update to dbfilter and db_name in the odoo-server.conf file.

Changed:

;db_name=erp-server-com
dbfilter=^%h$
list_db = True
proxy_mode = True

To:

db_name=erp-server-com
dbfilter=^erp-server-com$
list_db = False
proxy_mode = True
meurotops commented 5 years ago

I created a pull request, that fix that issus. Main reason is that when starting odoo with workers the preforkinit is not triggers at first. So when using this without connector channels the change of if clause will fix this issue. Pull Request #346

github-actions[bot] commented 2 years ago

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.