Frappe socketio server's port from 9000 to something else?

I have hard machine installed Frappe/ERPNext running on my server w/ a bunch of PHP applications.

I sometimes experience trouble to load my Frappe pages with following error, but this mostly occurs on Frappe Wiki’s frontpage.

Error1:

datetime.js:19 Uncaught TypeError: Cannot read properties of undefined (reading ‘time_zone’) at Object.convert_to_user_tz (datetime.js:19:19) at Object.zs [as prettyDate] (pretty_date.js:5:26) at window.RenderWiki.set_last_updated_date (wiki.js:48:45) at HTMLDocument. (render_wiki.js:104:14) at i (jquery.min.js:2:27151) at Object.fireWith [as resolveWith] (jquery.min.js:2:27914) at Function.ready (jquery.min.js:2:29707) at HTMLDocument.J (jquery.min.js:2:29892)

convert_to_user_tz @ datetime.js:19
zs @ pretty_date.js:5
set_last_updated_date @ wiki.js:48
(anonymous) @ render_wiki.js:104
i @ jquery.min.js:2
fireWith @ jquery.min.js:2
ready @ jquery.min.js:2
J @ jquery.min.js:2

Error 2:

website.js:26 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘assets_json’)
at Object.bundled_asset (website.js:26:23)
at website.js:15:38
at Array.map ()
at Object.require (website.js:15:17)
at upload.js:8:10
at website.js:282:4
at Array.forEach ()
at Object.trigger_ready (website.js:281:23)
at HTMLDocument. (website.js:655:9)

Error 3:

socketio_client.js:37
Uncaught TypeError: Cannot read properties of undefined (reading ‘disable_async’)
at al.init (socketio_client.js:37:19)
at website.js:670:18
at website.js:282:4
at Array.forEach ()
at Object.trigger_ready (website.js:281:23)
at HTMLDocument. (website.js:655:9)

After I load Wiki’s frontend pages, going back to Frappe/ERPNext’s backend becomes mega slow. The logo, for example, takes forever to load. Cleaning all caches at command line via bench (bench cleaer-cache, bench clear-website-cache) doesn’t help me much. The only solution worked for me so far is that w/ a new fresh browser, I login with an admin account, and log out my personal account from password change option.

I’ve been wondering what could be the cause of this problem for weeks. First I thought it is solely due to Wiki app’s issue. I still cannot rule it out, but seeing the error msgs on browser’s dev console, I wonder if it is anything to do with socket io’s port.

From the Nginx configuration, I can see that frappe-socketio-server calls 127.0.0.1:9000

Since PHP’s native FPM port is 9000, I wonder if two collides with each other, although all my PHP applications use socket connection (php8.3-fpm.sock).

If indeed it is the case, is there any way to change Frappe’s socket io port from 9000 to something else? like 9002, for example?

1 Like