ERPnext Setup error - Timeout error

Hi after my successful installation of ERPnext, i logged in using Administrator and was doing the initial set up. After complete setup, i am facing the following error.

I am doing the production install, When i checked the log files i go the following error,

[2020-02-12 12:00:15 +0000] [95361] [CRITICAL] WORKER TIMEOUT (pid:100996)
[2020-02-12 12:00:15 +0000] [100996] [ERROR] Error handling request /api/method/frappe.desk.page.setup_wizard.setup_wizard.setup_complete
Traceback (most recent call last):
File “/opt/bench/erpnext/apps/frappe/frappe/app.py”, line 60, in application
response = frappe.api.handle()
File “/opt/bench/erpnext/apps/frappe/frappe/api.py”, line 55, in handle
return frappe.handler.handle()
File “/opt/bench/erpnext/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/opt/bench/erpnext/apps/frappe/frappe/handler.py”, line 61, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/opt/bench/erpnext/apps/frappe/frappe/init.py”, line 1042, in call
return fn(*args, **newargs)
File “/opt/bench/erpnext/apps/frappe/frappe/desk/page/setup_wizard/setup_wizard.py”, line 71, in setup_complete
task.get(‘fn’)(task.get(‘args’))
File “/opt/bench/erpnext/apps/erpnext/erpnext/setup/setup_wizard/setup_wizard.py”, line 92, in stage_fixtures
fixtures.install(args.get(‘country’))
File “/opt/bench/erpnext/apps/erpnext/erpnext/setup/setup_wizard/operations/install_fixtures.py”, line 276, in install
set_more_defaults()
File “/opt/bench/erpnext/apps/erpnext/erpnext/setup/setup_wizard/operations/install_fixtures.py”, line 296, in set_more_defaults
add_uom_data()
File “/opt/bench/erpnext/apps/erpnext/erpnext/setup/setup_wizard/operations/install_fixtures.py”, line 327, in add_uom_data
}).insert(ignore_permissions=True)
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 253, in insert
self.run_method(“after_insert”)
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 787, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 1058, in composer
return composed(self, method, *args, **kwargs)
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 1043, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
File “/opt/bench/erpnext/apps/frappe/frappe/cache_manager.py”, line 133, in build_table_count_cache
}, as_dict=1)
File “/opt/bench/erpnext/apps/frappe/frappe/database/database.py”, line 932, in multisql
return self.sql(query, values, **kwargs)
File “/opt/bench/erpnext/apps/frappe/frappe/database/database.py”, line 171, in sql
self._cursor.execute(query)
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/pymysql/cursors.py”, line 170, in execute
result = self._query(query)
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/pymysql/cursors.py”, line 328, in _query
conn.query(q)
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/pymysql/connections.py”, line 517, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/pymysql/connections.py”, line 732, in _read_query_result
result.read()
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/pymysql/connections.py”, line 1082, in read
self._read_result_packet(first_packet)
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/pymysql/connections.py”, line 1152, in _read_result_packet
self._read_rowdata_packet()
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/pymysql/connections.py”, line 1186, in _read_rowdata_packet
packet = self.connection._read_packet()
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/pymysql/connections.py”, line 674, in _read_packet
recv_data = self._read_bytes(bytes_to_read)
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/pymysql/connections.py”, line 688, in _read_bytes
self._sock.settimeout(self._read_timeout)
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/gunicorn/workers/base.py”, line 201, in handle_abort
sys.exit(1)
SystemExit: 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/gunicorn/workers/sync.py”, line 134, in handle
self.handle_request(listener, req, client, addr)
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/gunicorn/workers/sync.py”, line 175, in handle_request
respiter = self.wsgi(environ, resp.start_response)
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/werkzeug/local.py”, line 231, in application
return ClosingIterator(app(environ, start_response), self.cleanup)
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/werkzeug/wrappers/base_request.py”, line 237, in application
resp = f(*args[:-2] + (request,))
File “/opt/bench/erpnext/apps/frappe/frappe/app.py”, line 88, in application
frappe.db.rollback()
File “/opt/bench/erpnext/apps/frappe/frappe/database/database.py”, line 753, in rollback
self.sql(“rollback”)
File “/opt/bench/erpnext/apps/frappe/frappe/database/database.py”, line 171, in sql
self._cursor.execute(query)
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/pymysql/cursors.py”, line 170, in execute
result = self._query(query)
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/pymysql/cursors.py”, line 328, in _query
conn.query(q)
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/pymysql/connections.py”, line 517, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/pymysql/connections.py”, line 732, in _read_query_result
result.read()
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/pymysql/connections.py”, line 1075, in read
first_packet = self.connection._read_packet()
File “/opt/bench/erpnext/env/lib/python3.6/site-packages/pymysql/connections.py”, line 671, in _read_packet
% (packet_number, self._next_seq_id))
pymysql.err.InternalError: Packet sequence number wrong - got 98 expected 1
[2020-02-12 12:00:15 +0000] [100996] [INFO] Worker exiting (pid: 100996)
[2020-02-12 12:00:15 +0000] [101725] [INFO] Booting worker with pid: 101725

Kindly help, how to fix this issue.

Thanks in advance.

Please refer to identical question :

Startup Wizard fails when creating property setter “rounded_total”

Have you found a way to get this to work?

I spun like 6 instances last 3 hours and didn’t face this issue with setup wizard. What’s the specs of the machine you’re installing in? Cloud vps or local machine?

It’s 64bit Ubuntu 16.04 in a xen snapshottable virtual machine running in a pay-by-the-hour Apache Cloudstack service:

  • 4Gb memory
  • 40Gb storage
  • 4 cpu 2Ghz

This was all working last week and I’ve been using them for close to 10 years, so I don’t expect they’re part of my problem.

I have same issue, any solid solution to this?

Now ERPnext is same as SAP ( As in the web)

But we can not create a company, post transactions

Always timeout

Why??

I had this issue with the initial setup of the production vm. [1]
I increased to gunicorn timeout setting (-t) from 120 to 240 as described here [2] and the problem went away.

[1] http://build.erpnext.com/ERPNext-Production.ova
[2] How to increase 'worker' timeout time?