I've been seeing this over the past week or so since I 
started separating my apps into subdomains using the parametric router. My 
entries are simple:

routers = dict(
    BASE = dict(
        domains = {
            'domain.com' : 'blog',
            'chat.domain.com' : 'chat',
            'maps.domain.com' : 'maps',
        }
    ),
)

The problem is sometimes when calling the function of a non-default 
controller it will try to run the controller as a function of default, 
giving me an invalid function error. If I focus on the address bar and just 
keep hitting enter eventually the server will get it right and route me to 
the correct controller and function. If I keep reloading the page it will 
eventually break again going back to the default controller. It's 
completely random. Sometimes it goes back and forth from broken to working 
fairly quickly. Sometimes it breaks for minutes at a time. Sometimes it 
works fine for minutes at a time.

A practical example:

I set up the controller `new` in my blog app with a function specific to 
creating a new blog entry via CRUD. When I got to domain.com/new/blog I get 
the error:

*Invalid Function (/default/new)*
*
*
I did an experiment and tried to call and invalid function on the correct 
controller (/new) and indeed it switched between telling me that 
/new/fakefunction and /default/new were invalid functions.

This behavior is quite unpredictable as to when it will pop up. Sometimes a 
new controller will not work right away. Sometimes a new controller will 
work fine. There are no correlating circumstances I can find. Reloading the 
router via Admin does not seem to help, nor does restarting uWSGI. I'm 
running web2py through uWSGI which is using my host's shared Nginx instance 
as an http proxy to save RAM if that's relevant.

Currently I'm running without a router as I'm quite a ways off from 
production so it doesn't matter. The issues does not show up without 
routes.py present. I've searched a bit and I seem to see others with 
possibly similar issues but I've seen no conclusive fixes.

-- 



Reply via email to