web2py scheduler service dead - how to prevent it?

84 views
Skip to first unread message

Mirek Zvolský

unread,
May 30, 2016, 6:15:18 AM5/30/16
to web2py-users
Please help....

Debian Jessie, postgres, web2py-scheduler

How can I prevent following crash - inactive scheduler?
Or how can I be sure that the scheduler is running and restart it if needed?



/etc/systemd/system/web2py-scheduler.service
-------------------------------------------------
[Unit]
Description=Web2py Scheduler service

[Service]
ExecStart=/usr/bin/python /home/www-data/web2py/web2py.py -K codex2020,codex2020,codex2020
Type=simple

[Install]
WantedBy=multi-user.target
-------------------------------------------------


systemctl status web2py-scheduler
-------------------------------------------------
web2py-scheduler.service - Web2py Scheduler service                                                                                        
  Loaded: loaded (/etc/systemd/system/web2py-scheduler.service; enabled)                                                                    
  Active: inactive (dead) since Mon 2016-05-30 02:16:39 CEST; 9h ago        <---- INACTIVE !!!!!!                                                                       
 Process: 5552 ExecStart=/usr/bin/python /home/www-data/web2py/web2py.py -K codex2020,codex2020,codex2020 (code=exited, status=0/SUCCESS)   
Main PID: 5552 (code=exited, status=0/SUCCESS)                                                                                              
                                                                                                                                            
May 30 02:16:39 mzDebian python[5552]: File "/home/www-data/web2py/gluon/contrib/pg8000/core.py", line 1697, in execute                      
May 30 02:16:39 mzDebian python[5552]: self.handle_messages(cursor)                                                                          
May 30 02:16:39 mzDebian python[5552]: File "/home/www-data/web2py/gluon/contrib/pg8000/core.py", line 1770, in handle_messages              
May 30 02:16:39 mzDebian python[5552]: self._close()                                                                                         
May 30 02:16:39 mzDebian python[5552]: File "/home/www-data/web2py/gluon/contrib/pg8000/core.py", line 1438, in _close                       
May 30 02:16:39 mzDebian python[5552]: self._flush()                                                                                         
May 30 02:16:39 mzDebian python[5552]: File "/usr/lib/python2.7/socket.py", line 303, in flush                                               
May 30 02:16:39 mzDebian python[5552]: self._sock.sendall(view[write_offset:write_offset+buffer_size])                                       
May 30 02:16:39 mzDebian python[5552]: error: [Errno 32] Broken pipe                                                                         
May 30 02:16:39 mzDebian python[5552]: Processes started                                                           

Mirek Zvolský

unread,
May 30, 2016, 6:38:25 AM5/30/16
to web2py-users
I have found this

Service section should contain following:
[Service]
Restart=always

It looks like it works,
so I hope it will be well.




Dne pondělí 30. května 2016 12:15:18 UTC+2 Mirek Zvolský napsal(a):

Dave S

unread,
May 30, 2016, 3:03:55 PM5/30/16
to web2py-users


On Monday, May 30, 2016 at 3:15:18 AM UTC-7, Mirek Zvolský wrote:
Please help....

Debian Jessie, postgres, web2py-scheduler

How can I prevent following crash - inactive scheduler?

Is the real problem that you're using pg8000?  I think there's been a lot of discussion of that driver recently, and the conclusion seems to be that it isn't reliable anymore.

 
Or how can I be sure that the scheduler is running and restart it if needed?


 
I see you've found an answer to that one, but I'd monitor to make sure it doesn't result in restarting the process when it shouldn't.

/dps


Reply all
Reply to author
Forward
0 new messages