Strange hangs with Chrome and IE/Edge

134 views
Skip to first unread message

Nico Zanferrari

unread,
Aug 28, 2020, 6:43:51 PM8/28/20
to py4web
Hi,

I've analyzed a bit a strange problem with py4web.

Most of the time, when I open the main page of a local installation with http://127.0.0.1:8000/  I get connection problems. Sometimes it takes few seconds, sometimes it's stuck until I close the page or the full browser.

- it happens only with Chrome  and IE/Edge, Firefox is fine
- when it happens, even Firefox is blocked until I resolve the problem with the other browser

I've discovered traces of a similar problem with Flask, see https://stackoverflow.com/questions/42519629/flask-not-processing-other-http-requests-after-chrome-browser-accesses-the-web-s . By the way the 'prediction service' setting is now called 'preload pages for faster browsing and searching', see https://www.ghacks.net/2019/04/23/missing-chromes-use-a-prediction-service-setting/ 
Indeed, changing this single setting resolve the problem for the latest Chrome version!

Could you confirm this problem? Can we resolve it server-side?

Nico


Kevin Keller

unread,
Aug 29, 2020, 7:25:37 AM8/29/20
to Nico Zanferrari, py4web

--
You received this message because you are subscribed to the Google Groups "py4web" group.
To unsubscribe from this group and stop receiving emails from it, send an email to py4web+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/py4web/CAAE8D_D1bEKKO0AS0f_NAxKCuPMmr_vz5T6UThJK4Sy0SYpUDQ%40mail.gmail.com.

Massimo

unread,
Aug 29, 2020, 1:27:56 PM8/29/20
to py4web
But we already use gevent and or Tornado. Are they not packaged in windows? If not, then we can use rocket, the multithreaded server we built for web2py.

Massimo

unread,
Aug 29, 2020, 4:35:56 PM8/29/20
to py4web
OK. I settled for waitress as rocket has not been maintained in years and has problem exiiting gracefully. Mind that we do not pass ssl sertificates to waitress at this time. Should be an easy fix but no ssl on windows at this time.
On Saturday, 29 August 2020 at 04:25:37 UTC-7 kell...@gmail.com wrote:

Nico Zanferrari

unread,
Aug 29, 2020, 5:03:04 PM8/29/20
to Massimo, py4web
I've already tested the new build and it seems to work fine on the three major browser on Windows !!!

I'm building new binaries (after adding 'waitress' to the needed imports in pyinstaller). By the way, this is what I get in the console - and now it clearly shows  "using WaitressServer()":

C:\Users\nico\Desktop\py4web_win_1.20200829.1\py4web>py4web-start.exe run apps

██████╗ ██╗   ██╗██╗  ██╗██╗    ██╗███████╗██████╗
██╔══██╗╚██╗ ██╔╝██║  ██║██║    ██║██╔════╝██╔══██╗
██████╔╝ ╚████╔╝ ███████║██║ █╗ ██║█████╗  ██████╔╝
██╔═══╝   ╚██╔╝  ╚════██║██║███╗██║██╔══╝  ██╔══██╗
██║        ██║        ██║╚███╔███╔╝███████╗██████╔╝
╚═╝        ╚═╝        ╚═╝ ╚══╝╚══╝ ╚══════╝╚═════╝
Is still experimental...

Py4web: 1.20200829.1 on Python 3.7.4 (tags/v3.7.4:e09359112e, Jul  8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]


Dashboard is at: http://127.0.0.1:8000/_dashboard
[X] loaded examples
[X] loaded myfeed
[X] loaded todo
[X] loaded _dashboard
[X] loaded _default
[X] loaded _documentation
[X] loaded _minimal
[X] loaded _scaffold
Bottle v0.12.18 server starting up (using WaitressServer())...
Listening on http://127.0.0.1:8000/
Hit Ctrl-C to quit.

Serving on http://DESKTOP-KQI2P47:8000

 

Cheers,
Nico

Nico Zanferrari

unread,
Aug 29, 2020, 6:14:10 PM8/29/20
to Massimo, py4web
New binaries built, see  https://github.com/nicozanf/py4web-pyinstaller . On MacOS, it correctly uses Tornado.

But I've found a small problem with waitress on Windows - it logs on the console many errors like this one:

ERROR:waitress:Socket error
Traceback (most recent call last):
  File "waitress\channel.py", line 144, in handle_read
  File "waitress\wasyncore.py", line 446, in recv
  File "gevent\_socket3.py", line 378, in recv
    return _socket.socket.recv(self._sock, *args)
BlockingIOError: [WinError 10035] A non-blocking socket operation could not be completed immediately


Nico

Val K

unread,
Aug 29, 2020, 7:55:01 PM8/29/20
to py4web
As windows user,  I'm happy with this https://winpython.github.io
and this https://git-scm.com/download/win ("thumbdrive edition" - works even from USB) - git-bush cli !!!
both are portable, no installation required

воскресенье, 30 августа 2020 г. в 01:14:10 UTC+3, nico...@gmail.com:

Massimo

unread,
Aug 29, 2020, 9:22:33 PM8/29/20
to py4web
I think there is value in a standalone windows package like Nico is building.
In fact I think we should be make it more prominent with links from the web page.
Nico feel free to make a PR with the links.

Val K

unread,
Aug 30, 2020, 7:15:53 AM8/30/20
to Massimo, py4web
yes, of course, binaries that work out of the box is a key feature for newbies (I started with that too;)

вс, 30 авг. 2020 г. в 04:22, Massimo <massimo....@gmail.com>:
You received this message because you are subscribed to a topic in the Google Groups "py4web" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/py4web/A2-5tz3FwyM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to py4web+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/py4web/e09fcb0b-da4f-478a-ae86-361ac9ea2535n%40googlegroups.com.

Nico Zanferrari

unread,
Aug 30, 2020, 6:44:36 PM8/30/20
to Val K, Massimo, py4web
Thank you Val, I didn't know   https://winpython.github.io - it could be useful in some situations!

@Massimo: I've made the PR , and I've also filed the Issue #275 for the console errors.

Nico

Reply all
Reply to author
Forward
Message has been deleted
0 new messages