python - Accessing MySQL from multiple views of a web site -
i writing web tool using python , pyramid. access mysql database using mysqldb , queries based on user input. created user account tool , granted read access on tables uses.
it works fine when open page in single tab, if try loading in second tab page won't load until first search finished. there way around or trying use mysql incorrectly?
what @alexivanov trying when you're starting pyramid app in console served using pyramid's built-in development server. server single-threaded , serves requests 1 after another, if have long request takes, say, 15 seconds - won't able use app in tab until long request finishes. sequential nature of built-in webserver awesome feature simplifies debugging.
in production, pyramid app served "real" webserver, such apache or nginx. such webservers spawn multiple "workers", or use multiple threads allow them serve multiple concurrent requests.
so suspect there's nothing wrong setup (provided didn't particularly strange pyramid's initial scaffold , it's still using sqlalchemy's session configured zopetransactionextension etc.).
a "single shared mysql account" in no way prevents multiple connected clients running queries concurrently in mysql - thing is, development server have 1 single-threaded client.
Comments
Post a Comment