Server side with 1 million records strange problem

Server side with 1 million records strange problem

massiminomassimino Posts: 3Questions: 0Answers: 0
edited February 2011 in General
Hi all

I have a strange problem with server side processing.
I'm work on a table with about 1 million rows.
Processing.php everything works correctly by running in a few seconds I get the answer to all records in the table.
But if I run results.php (the file with my data) does not work.
I checked with Firebug XHR response after 42 seconds: 500 internal server error.
But if I start a filter, I get the result correctly.
If I delete 400,000 records to the table, everything works fine.

You have no idea if this may be due to a timeout of some javascript library?

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    More likely a timeout on the server-side I would have said if you are getting a 500 error. A check of the server error log would confirm if that is the case.

    42 seconds for server-side processing seems a very long time! I've seen 20 million row databases answer the call in a fraction of a second - which is the whole point of having server-side processing. It would be worth seeing what is taking so long - perhaps the SQL query - and seeing if it can be optimised at all.

    Allan
  • massiminomassimino Posts: 3Questions: 0Answers: 0
    Hello Allan, I am very glad to meet you, you have done a wonderful job.
    And Thanks for your quick reply.
    Via phpmyadmin time is this: "Displaying records 0 to 29 (Total 949.470, Query took 0.0008 sec).
    So I think the problem is beetween processing.php and my edited file.
    Have you got any idea?
  • justin_ruch1180justin_ruch1180 Posts: 1Questions: 0Answers: 0
    edited March 2011
    That is a lot of rows...
  • massiminomassimino Posts: 3Questions: 0Answers: 0
    Are a lot but I'm sure I'm doing something wrong.
    I'm working on local with easyPhp and have to be fast.
    I'm trying to understand where is my error.
  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    What is your processing script doing? Are you using one of the template ones, or your own? The script will need to execute three queries if you are using MySQL ( something like this: http://www.datatables.net/development/server-side/php_mysql ) - it would be worth printing each one out and executing it using phpmyadmin and see what is taking so long.

    Allan
This discussion has been closed.