When I am trying to display a web page which is more than 12MB, it takes too much time to load and error will pop up with the following message: Warning : Unresponsive script , stop the script and continue. is there any better solution to display pages having large size (like as chunks)? Thanks
Thanks for your reply The page contains only text contents no images or other scripts. It is a text file which is stored in mysql as compressed format and I am taking it from db, decompressing and trying to display. But at the point of decompression it ok and then it fails.
It is advised to split the data into chunks. Is it for download purpose? Or just displaying your very long text file? Another thing, try to increase the execution limit on php. Usually it's around 30 seconds. But now try to use 0, it means unlimited. set_time_limit(0); PHP: At the end, I still don't know why you need 12 MB static text files.
It is not for download propose, just displaying the large content. usually for small documents it is working fine and for large ones this problem occurs Could you specify how to display in chunks? and here is the answer of your last quest: It is some data mining process, fetch raw file, process, store in db and display
Hi, If you were storing that big data into 1 BLOB mysql field, then it's no luck to use splitting. It is still possible, but still you will find your php script takes longer process time to retrieve all 12 MB data and then display it. You must redesign the database on how you store the data. If you can provide more details on your database structure, perhaps I can suggest to use pagination. You can also find pagination technique in this forum. (I forgot where it is).
I would suggest he uses PHP to generate HTML files rather than store it in the database... that's a ridiculous amount of data. Since PHP parses the request to the database, and pulls the info from the database and displays it every time someone loads the page, you will see a significant performance hit on your server if you get more than say, 5 people loading the page at a time (this is a bit of an exaggeration, though if you're on a shared host and serving those sized files to 50+ users, your bandwidth will go down the tube fast; and I'd say about 50 (+/- 25) users on the site before it fills the servers ram completely). I also wouldn't put it all in one html file either, but split it up as pages. This way the HTML file doesn't make the PHP engine start up when the page is opened, which takes alot of pressure off of your server. If you don't, I truly hope you have Zend Optimizer installed on your server so the PHP is at least caching the binary data.
Thank you for your responses! I am using the MySQL blob field to store this data and compressing it before saving in the database (this 12MB takes only 500KB space in db). The other thing is, it is saving as a php object, so there no transformation for each request just fetch the data as display as itself. There are millions of records in the database and it is tuned to handle the requests from multiple users. There are a few documents having this issue (<150). The thing I want to know is, whether I can able to display this large text in chunks with in a single page. I mean display one block first, after completing send the request and take the next block and so on and this is in a single page. I don't want to paginate the same file into multiple pages The error message I am getting is Warning : Unresponsive script A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.