Server Error (BrokenPipeError: [Errno 32] Broken pipe)

When I keep my session idle over night and open it in the next morning, it appear as server error, unless I clear my browser cache. How can i resolve and prevent this problem?

Server Error
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 52, in application
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 117, in init_request
frappe.local.http_request = frappe.auth.HTTPRequest()
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 51, in init
frappe.local.login_manager = LoginManager()
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 113, in init
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 188, in make_session
full_name=self.full_name, user_type=self.user_type)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 194, in init
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 255, in resume
data = self.get_session_record()
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 273, in get_session_record
r = self.get_session_data()
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 287, in get_session_data
data = self.get_session_data_from_cache()
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 304, in get_session_data_from_cache
BrokenPipeError: [Errno 32] Broken pipe

Is there a solution to this error? I am encountering it as well after my session stayed open for long

For temporary solution, you can clear your browser’s cache, it will work fine, but I could not find out the best solution yet.

@usopheak Why the session is idle ?

Is it development environment ? If yes then you have to kill the process of the frappe, node, redis, and have to start bench.

But, if you are using development environment as production environment i.e using bench start in virtual machine (VM). Then you have to do setup for the production using nginx and supervisord

For me. I take a backup from my current server and make new server and restore it again that’s working with me

1 Like

I’m doing a bench destroy-all-sessions but I have to do almost every day. It needs permanent fixing

This is a network infrastructure problem; only your local providers can help you identify and remedy your particular case.

Actually ended up noticing that on the server where I had this issue, Scheduled jobs weren’t running. Which means the clear-expired-sessions job wasn’t being executed, leading to the Brokenpipe error on
FIX = Make sure the scheduled jobs are running.

1 Like

@Clement_Uwajeneza1 Can you please let me know, which are the scheduled jobs and how to identify it?


I am also facing same issue, do you get the solution.

how to make sure the scheduled jobs are running?

and if not then what to do?