neller Posted August 17, 2010 Share Posted August 17, 2010 Hi guys, Wasnt 100% sure how to title it but this is what I'm trying to do... I have a site where 99% of the pages load pretty fast but there is 1 page which takes about 3 mins to load (very big database useage) When the user opens this page they can't load any of the other pages until this one has finished loading, is it possible to say open a second connection when using this page so they can carry on using the rest of the site while this is loading? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/211020-multiple-connections-for-same-user/ Share on other sites More sharing options...
abdfahim Posted August 18, 2010 Share Posted August 18, 2010 I guess you are testing it in localhost or some private server, ryt? In that case, I think the query you use in that page cause your server's processor usage too high, otherwise it shouldn't interfere with 2nd page (if server's resource is not full) My pick is, try to re-write your query. I have one server with ~20 tables, with more than 36 million rows in each table and still around 40 people is browsing the webpage simultaneously successfully, and believe me each of those pages run too many sql query. So, I am not sure whether the "big table" is causing the problem, or some infinite loop is keeping your server busy. Quote Link to comment https://forums.phpfreaks.com/topic/211020-multiple-connections-for-same-user/#findComment-1100639 Share on other sites More sharing options...
kickstart Posted August 18, 2010 Share Posted August 18, 2010 Hi Is it just that user tied up, or the whole server? I would be more inclined to try and streamline the query (or queries) that is taking ages. With good use of indexes the table sizes in most situations shouldn't be too much of a problem. All the best Keith Quote Link to comment https://forums.phpfreaks.com/topic/211020-multiple-connections-for-same-user/#findComment-1100648 Share on other sites More sharing options...
neller Posted August 18, 2010 Author Share Posted August 18, 2010 thansk for the reply guys. The server doesn't get tied up just that user, the page istelf uses loads of various tables the page loads pretty well due to the amount of data it displays, BUT the user has to wait for that page to load before any of the others will bother loading. The second that page finishes loading then the other pages load instantly again. If the same user was on the website using 2 different browsers / database connections, then they can easily load that big page in 1 and move around the site in the other, but this is not ideal as I need them to be able to do it in the 1 session. I tried doing a new / seperate database connect for that page, but that didnt work either Quote Link to comment https://forums.phpfreaks.com/topic/211020-multiple-connections-for-same-user/#findComment-1100695 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.