very long wait for http://127.0.0.1:8000/ on IE and Firefox browsers

869 views
Skip to first unread message

Carlos

unread,
Nov 20, 2010, 8:50:54 PM11/20/10
to web2py-users
Hi,

Why do IE (v. 8) and Firefox (v. 3.6 with Firebug) browsers quite
often take a LOOONG time to load web2py urls in the following format?:

http://127.0.0.1:8000/

I just see in the following in the status bar:

Waiting for http://127.0.0.1:8000/ ...

Even after trying to refresh/reload many times, and then all of the
sudden everything work ok, until the delays occur again !

When using Chrome, I never have to wait, there are no delays, and
everything is very fast.

I'm using web2py 1.89.1 source on win7.

Any ideas?.

Thanks,

Carlos

Bruno Rocha

unread,
Nov 20, 2010, 9:05:43 PM11/20/10
to web...@googlegroups.com
Windows firewall, browser security settings or some antivirus system?

2010/11/20 Carlos <carlos...@gmail.com>



--

Bruno Rocha
http://about.me/rochacbruno/bio

Gary Herron

unread,
Nov 20, 2010, 9:10:44 PM11/20/10
to web...@googlegroups.com


I never see this with any browser, IE, Firefox, or Chrome. It seems
more likely to be a function of the server -- but we'll need a lot more
information to debug that.

--
Gary Herron, PhD.
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418

Phyo Arkar

unread,
Nov 20, 2010, 9:10:58 PM11/20/10
to web...@googlegroups.com
I got very long loading time on examples ., it just waiting for (about
10-15 seconds) and do nothing.
http://127.0.0.1:8000/examples

I suspect Twitter loads but they supposed to be load after document is
ready, right?

Bruno Rocha

unread,
Nov 20, 2010, 9:23:06 PM11/20/10
to web...@googlegroups.com
examples loads google groups and google code RSS, Welcome loads Jquery from cdn.google, admin loads twitter feed and update/upgrade information. can be that. 

2010/11/21 Phyo Arkar <phyo.ar...@gmail.com>

mdipierro

unread,
Nov 20, 2010, 9:33:21 PM11/20/10
to web2py-users
yes. the twitten part is loaded via ajax. Should not cause the delay.

On Nov 20, 8:10 pm, Phyo Arkar <phyo.arkarl...@gmail.com> wrote:
> I got very long loading time on examples ., it just waiting for (about
> 10-15 seconds) and do nothing.http://127.0.0.1:8000/examples
>
> I suspect Twitter loads but they supposed to be load after document is
> ready, right?
>
> On 11/21/10, Bruno Rocha <rochacbr...@gmail.com> wrote:
>
> > Windows firewall, browser security settings or some antivirus system?
>
> > 2010/11/20 Carlos <carlosgali...@gmail.com>

Luis Díaz

unread,
Nov 20, 2010, 9:56:26 PM11/20/10
to web...@googlegroups.com
I had a similar problem and was produced by my work poxy

if you are behind a proxy, I recommend you disable it in your browser while you do local tests.

----------------------
google translator

--
Díaz Luis
TSU Analisis de Sistemas
Universidad de Carabobo


Carlos

unread,
Nov 20, 2010, 9:57:58 PM11/20/10
to web2py-users
This issue is not related to any extra/ajax loading (e.g. in admin or
so), I've tried it with everything: admin, appadmin, welcome, my app,
etc., same long delay.

The load takes about one full minute !

Strangely it only occurs *intermitently* in IE and Firefox, but Chrome
(and maybe Opera) work ok all the time.

I use AVG free antivirus.

Any other info I should provide?, any other ideas?.

Thanks,

Carlos

Phyo Arkar

unread,
Nov 20, 2010, 10:14:48 PM11/20/10
to web...@googlegroups.com
>"Welcome loads Jquery from cdn.google"

Yea that explain for my case , i have slow internet connection (well
the whole contry here is slow internet) .

Thats why it get slow after updated.Carlos loading javascript outside
of the localhost make it bad response time for app. and it is not ajax
(not document ready yet) so may be that caused you?

Phyo Arkar

unread,
Nov 20, 2010, 10:20:59 PM11/20/10
to web...@googlegroups.com
Massimo , i think web2py local default app should not load code from non-local.
.
In some place where theres no internet everytime (many third world
countries) , it will cause problems .If a new comer tried while
internet is down , that will caused bad impression for web2py

> Odontología<http://www.odontologia.uc.edu.ve/index.php?option=com_content&view=article&id=102&Itemid=85>
>

Bruno Rocha

unread,
Nov 20, 2010, 10:27:13 PM11/20/10
to web...@googlegroups.com
Just change the 

<!-- Grab Google CDN's jQuery. fall back to local if necessary -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.js"></script>

with a local jquery.js

2010/11/21 Phyo Arkar <phyo.ar...@gmail.com>

mdipierro

unread,
Nov 20, 2010, 10:48:48 PM11/20/10
to web2py-users
I took it out everywhere from trunk. This seemed like a good idea but
it is not.

On Nov 20, 9:27 pm, Bruno Rocha <rochacbr...@gmail.com> wrote:
> Just change the
>
> <!-- Grab Google CDN's jQuery. fall back to local if necessary -->
> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.js
> "></script>
>
> with a local jquery.js
>
> 2010/11/21 Phyo Arkar <phyo.arkarl...@gmail.com>
>
>
>
> > >"Welcome loads Jquery from cdn.google"
>
> > Yea that explain for my case , i have slow internet connection (well
> > the whole contry here is slow internet) .
>
> > Thats why it get slow after updated.Carlos loading javascript outside
> > of the localhost make it bad response time for app. and it is not ajax
> > (not document ready yet) so may be that caused you?
>

Anthony

unread,
Nov 20, 2010, 11:17:51 PM11/20/10
to web2py-users
This sounds like the problem I reported here (also on Windows 7):
http://groups.google.com/group/web2py/msg/6b8b1148f4ccca9a

I notice it very consistently in IE, but only when I try to open
multiple web2py apps in separate IE tabs (a new tab hangs even if all
other tabs are fully loaded). For example, with admin open, right
clicking on Welcome and selecting "Open in New Tab" causes Welcome to
hang for a minute or two before loading in the new tab -- but simply
clicking on Welcome so it loads in the same tab as admin loads it
instantly. I think I've seen this in FF, but definitely not as
consistently as IE.

I just tried trunk with the Google CDN references removed from
web2py_ajax.html, but that didn't make any difference -- I see the
same exact behavior.

By the way, all the web2py_ajax.html files in trunk still have the
following comment at the top, even though the Google CDN link was
removed:

<!-- Grab Google CDN's jQuery. fall back to local if necessary -->


Anthony
> > Bruno Rochahttp://about.me/rochacbruno/bio- Hide quoted text -
>
> - Show quoted text -

Jason Brower

unread,
Nov 21, 2010, 1:44:52 AM11/21/10
to web...@googlegroups.com
Actually, if you just unplug your internet before you start.  It will just fly because it gets the error and just uses the local one.  But that's not a solution for everyone.  My network cable is a local network online and having it plugged in makes the browser look for the page for about a minute.

Branko Vukelic

unread,
Nov 21, 2010, 6:09:12 AM11/21/10
to web...@googlegroups.com
On Sun, Nov 21, 2010 at 3:23 AM, Bruno Rocha <rocha...@gmail.com> wrote:
> examples loads google groups and google code RSS, Welcome loads Jquery from
> cdn.google, admin loads twitter feed and update/upgrade information. can be
> that.

Admin will load the whole page before it gets to loading the AJAX stuff.

--
Branko Vukelić

bg.b...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group

selecta

unread,
Nov 21, 2010, 2:00:00 PM11/21/10
to web2py-users
I have problems when I call the same page with multiple browsers at
the same time. As soon as i close all but one browser the page
loads. ... but thinking about it this should be unrelated

David Marko

unread,
Nov 21, 2010, 2:11:53 PM11/21/10
to web2py-users
### I have problems when I call the same page with multiple browsers
at the same time.
I can see the same problem. I use Chrome as primary browser. Then when
I try to test the page in other browsers(FF, MSIE etc.) the page load
time is very, very slow.

David

Anthony

unread,
Nov 21, 2010, 3:18:35 PM11/21/10
to web2py-users
Same thing here (actually, I think it happens even when loading a
different web2py app in another browser).

Anthony
> > >    Carlos- Hide quoted text -

Phyo Arkar

unread,
Nov 21, 2010, 4:16:43 PM11/21/10
to web...@googlegroups.com
Have you guys made jquery load locally instead of google's CDN ?

Still happening?

For me it fixed after i fixed to load jquery locally.

Anthony

unread,
Nov 21, 2010, 4:45:49 PM11/21/10
to web2py-users
Yes, I'm running trunk, which Massimo already updated to run jQuery
locally.

On Nov 21, 4:16 pm, Phyo Arkar <phyo.arkarl...@gmail.com> wrote:
> Have you guys made jquery load locally instead of google's CDN ?
>
> Still happening?
>
> For me it fixed after i fixed to load jquery locally.
>
> >> - Show quoted text -- Hide quoted text -

Phyo Arkar

unread,
Nov 21, 2010, 9:48:58 PM11/21/10
to web...@googlegroups.com
I tested , opened 20 welcome pages atonce , and also my application at once. No slow down (not trunk but i commented out google cdn jquerys). So that fixed for me.

Anthony

unread,
Nov 21, 2010, 11:15:56 PM11/21/10
to web2py-users
On Nov 21, 9:48 pm, Phyo Arkar <phyo.arkarl...@gmail.com> wrote:
> I tested , opened 20 welcome pages atonce , and also my application at once.
> No slow down (not trunk but i commented out google cdn jquerys). So that
> fixed for me.

Which OS and browser? I'm on Windows 7, and the problem is mostly with
IE.

Anthony

Phyo Arkar

unread,
Nov 22, 2010, 5:21:29 PM11/22/10
to web...@googlegroups.com
Oh well i tried with ffox and chrome , under linux..

Kuba Kucharski

unread,
Nov 22, 2010, 5:34:26 PM11/22/10
to web...@googlegroups.com
Just a hyphotesis, I've seen the issue you are describing many times.
It always disapears when I move from Rocket to Apache/WSGI. It seems
to me that it got smth to do with handling static files.

--
Kuba

Kuba Kucharski

unread,
Nov 22, 2010, 5:37:07 PM11/22/10
to web...@googlegroups.com
ok, if it disappers on unpluging network, that it is not that issue, sorry

Phyo Arkar

unread,
Nov 22, 2010, 5:42:14 PM11/22/10
to web...@googlegroups.com
It still happening for Anthony and Carlos.

Anthony

unread,
Nov 22, 2010, 5:58:34 PM11/22/10
to web2py-users
You might be onto something. Sometimes once the examples app has
partially loaded, it continues to hang as it tries to load some of the
images from the static folder (at that point, hitting refresh often
quickly resolves the problem).

Anthony

Phyo Arkar

unread,
Nov 22, 2010, 6:25:00 PM11/22/10
to web...@googlegroups.com
Hmm rocket server issue again..?

also what i see is Rocket server is not updated for very long , Massimo , is Rocket still in development or dead ? , i dont see any development updates there..

Timbo

unread,
Nov 23, 2010, 8:03:03 PM11/23/10
to web2py-users
Rocket is not dead but I did take several months off due to injury and
a job change. I'm actually working on 1.2 which should see some
performance improvements on Windows.

I'll go download a copy of web2py and report back.

-tim

On Nov 22, 5:25 pm, Phyo Arkar <phyo.arkarl...@gmail.com> wrote:
> Hmm rocket server issue again..?
>
> also what i see is Rocket server is not updated for very long , Massimo , is
> Rocket still in development or dead ? , i dont see any development updates
> there..
>

Timbo

unread,
Nov 23, 2010, 8:10:40 PM11/23/10
to web2py-users
Set numthreads=0 in your options.py. See if you still see this
behavior.

-tim

Anthony

unread,
Nov 23, 2010, 8:26:44 PM11/23/10
to web2py-users
On Nov 23, 8:10 pm, Timbo <tfarr...@owassobible.org> wrote:
> Set numthreads=0 in your options.py.  See if you still see this
> behavior.

options.py is just for running web2py as a Windows service, no? I'm
not running web2py as a Windows service when I observe the problem.

Anthony

Jonathan Lundell

unread,
Nov 23, 2010, 9:26:38 PM11/23/10
to web...@googlegroups.com

If you're running from the command line, use --options 0.

Anthony

unread,
Nov 23, 2010, 11:48:14 PM11/23/10
to web2py-users
Do you mean use the -n command line option to set numthreads to 0,
e.g.:

python web2py.py -a password -i 127.0.0.1 -p 8000 -n 0

I tried this, but in that case, I can't get 127.0.0.1:8000 to load at
all (it just hangs indefinitely).

Anthony

Anthony

unread,
Nov 23, 2010, 11:59:31 PM11/23/10
to web2py-users
I went into rocket.py and set both DEFAULT_MIN_THREADS and
DEFAULT_MAX_THREADS to 0, and the problem I described (i.e., long load
times when trying to load apps into separate IE browser tabs) seems to
go away (apps now load instantly in new IE tabs).

Anthony

Timbo

unread,
Nov 24, 2010, 12:18:09 AM11/24/10
to web2py-users
That's essentially the effect I was going for. No need to change
DEFAULT_MIN_THREADS, changing DEFAULT_MAX_THREADS should have the
desired effect.

Jonathan Lundell

unread,
Nov 24, 2010, 12:31:15 AM11/24/10
to web...@googlegroups.com

Right, now that I look at it, there's no way to override max_threads. Maybe there should be....

Phyo Arkar

unread,
Nov 24, 2010, 8:59:20 AM11/24/10
to web...@googlegroups.com
I haven't tried DEFAULT_MAX_THREADS it yet but to report that it is not just windows problem it happens in Linux too.
WHen i test my Homepage which dont do anything dynamic much , just login box , with static js and css. That caused long load delays too.

Tim , sorry to know that u got injury. Had you recovered well now?

Jonathan Lundell

unread,
Nov 24, 2010, 10:56:06 AM11/24/10
to web...@googlegroups.com
On Nov 24, 2010, at 5:59 AM, Phyo Arkar wrote:
I haven't tried DEFAULT_MAX_THREADS it yet but to report that it is not just windows problem it happens in Linux too.
WHen i test my Homepage which dont do anything dynamic much , just login box , with static js and css. That caused long load delays too.

By all means give max-threads a try. If the problem is thread starvation, it's not likely to be Windows-specific. The default limit is 10, which isn't a lot for pages with a lot of resources.

Timbo

unread,
Nov 24, 2010, 11:37:37 AM11/24/10
to web2py-users
I didn't mean to imply that the enhancements I'm planning for 1.2
(window speed) address this issue...just to be clear.

@Jonathan: Yes we need to make numthreads map to max-threads and
default it to 0 (unlimited) or a very high number. The only time
reasonable to change this is when running web2py (rocket) on Jython.
See:

http://packages.python.org/rocket/usage.html#architecture-considerations

@Phyo: Thanks. I'm not fully recovered, but enough to get back in the
game.

-tim

On Nov 24, 9:56 am, Jonathan Lundell <jlund...@pobox.com> wrote:
> On Nov 24, 2010, at 5:59 AM, Phyo Arkar wrote:
>
> > I haven't tried DEFAULT_MAX_THREADS it yet but to report that it is not just windows problem it happens in Linux too.
> > WHen i test my Homepage which dont do anything dynamic much , just login box , with static js and css. That caused long load delays too.
>
> By all means give max-threads a try. If the problem is thread starvation, it's not likely to be Windows-specific. The default limit is 10, which isn't a lot for pages with a lot of resources.
>
>
>
>
>
>
>
>
>
> > Tim , sorry to know that u got injury. Had you recovered well now?
>

Timbo

unread,
Dec 1, 2010, 9:39:13 AM12/1/10
to web2py-users
Rocket 1.2.0 is out. It addresses the issue above and has some speed
improvements (though that might not be noticeable to the user). If
you look at the code, it's much cleaner than it was and reflects my
maturing skill as a developer. I've tested it on cPython 2.4 (the
legacy branch support Py2.4), 2.5, 2.6, 3.1, Jython 2.5.1 and Pypy 1.4
on Windows 7 and cPython 2.6 on Ubuntu.

While building a patch for web2py is not that complicated, I'm time-
restricted until the weekend. If you can't wait that long, bug
Jonathan Lundell. He's familiar enough to do it. ;-)

Cheers,
-tim

mdipierro

unread,
Dec 1, 2010, 10:58:24 AM12/1/10
to web2py-users
I will wait for the patch from you or Jonathan. I can wait the week-
end.
Reply all
Reply to author
Forward
0 new messages