reload routes from admin can fail

17 views
Skip to first unread message

Michele Comitini

unread,
Jan 21, 2015, 5:27:40 PM1/21/15
to web2py-developers
I noticed that the logic does not work in multiprocessing environments, routes are reloaded only on the process running admin.
This feature has to be fixed or removed until a fix is found.

Massimo DiPierro

unread,
Jan 21, 2015, 5:53:16 PM1/21/15
to web2py-d...@googlegroups.com

I can fix this one.

On Jan 21, 2015 4:27 PM, "Michele Comitini" <michele....@gmail.com> wrote:
I noticed that the logic does not work in multiprocessing environments, routes are reloaded only on the process running admin.
This feature has to be fixed or removed until a fix is found.

--
-- mail from:GoogleGroups "web2py-developers" mailing list
make speech: web2py-d...@googlegroups.com
unsubscribe: web2py-develop...@googlegroups.com
details : http://groups.google.com/group/web2py-developers
the project: http://code.google.com/p/web2py/
official : http://www.web2py.com/
---
You received this message because you are subscribed to the Google Groups "web2py-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py-develop...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Niphlod

unread,
Jan 22, 2015, 4:02:58 PM1/22/15
to web2py-d...@googlegroups.com
I guess it's a well known bug because this sounds like a deja-vu. Don't really know what could be the solution without web2py being able to interact with all processes at once.

Michele Comitini

unread,
Jan 22, 2015, 4:13:52 PM1/22/15
to web2py-developers
one has to use a shared file, cache.disk could work.

put the pickled list of pids  in it, and do:
if not mypid in router_realoaded_pids:
    reload_router()
    router_reloaded_pids.append(mypid)

when reload is needed the list is emptied.
There is an impact on performance due to chache.disk locking...






--

Niphlod

unread,
Jan 22, 2015, 4:20:33 PM1/22/15
to web2py-d...@googlegroups.com
and check for every request another file "a la DISABLED" (plus serialization issue due to the shared lock) ? please don't!

I very much prefer to reload routes SIGHUPing whatever is the frontend to let it reload properly.
Reply all
Reply to author
Forward
0 new messages