Home > AXS Visitor Tracking > Help > 1001

Size limit on the log file

The ax-admin script reads and processes the entire log file with each request. The entire log -- containing potentially tens of thousands of records -- is stored in memory while ax-admin runs.

There will come a point where the log file is so big, and processing it requires so many resources, that the ax-admin script will fail. It fails because the web server has time and resource limits that it enforces on all CGI child processes. ax-admin will exceed those limits for sufficiently large logs, and when that happens the web server will kill the script. The visitor will see either an "internal server error" message or will see a response from the script that stops in the middle of the page.

When this happens, the solutions are:

How to know when log file size is the problem

The size of the log file at which this problem arises will be different on every host, due to differences in server power and configuration. Because of this, and because no meaningful error message is printed, it can be difficult to tell when log file size is the cause of a problem.

To determine whether log size is the problem, follow these steps:

  1. First, connect to your web server with FTP.

  2. Find the AXS log.txt. If it is small (less than 1MB), then this probably isn't the problem. Otherwise, rename "log.txt" to "log.bak".

  3. Then create an empty "log.txt" with the same permissions as the previous one.

  4. Then try to visit ax-admin in your web browser.

    • If ax-admin now works, then the problem was due to a log file that was too large.

    • Otherwise, if ax-admin continues to have problems, then the problem is not isolated to the log file size. In that case, you should delete the temporary empty "log.txt" that was just created, and rename "log.bak" back to its original name.


Future versions of AXS will be more efficient at reading large logs, and will print some meaningful warning message before being killed for violating a resource limit.

    "Size limit on the log file"