@tsumi opened this Issue on June 29th 2015

Hi,
I'm using the phython script to import apache logs into piwik drought a cron script appended to logrotate.
Lot's of times (about 1 day every 2) i receive a log like this from cron:

2015-06-26 07:00:21,736: [INFO] Error when connecting to Piwik: HTTP Error 413: Request Entity Too Large
2015-06-26 07:00:21,737: [INFO] Retrying request, attempt number 2
2015-06-26 07:00:31,924: [INFO] Error when connecting to Piwik: HTTP Error 413: Request Entity Too Large
2015-06-26 07:00:31,925: [INFO] Retrying request, attempt number 3
2015-06-26 07:00:42,100: [INFO] Error when connecting to Piwik: HTTP Error 413: Request Entity Too Large
2015-06-26 07:00:42,101: [INFO] Max number of attempts reached, server is unreachable!
Fatal error: HTTP Error 413 Request Entity Too Large, response: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>413 Request Entity Too Large</title>
</head><body>
<h1>Request Entity Too Large</h1>
The requested resource<br />/piwik.php<br />
does not allow request data with POST requests, or the amount of data provided in
the request exceeds the capacity limit.
<hr>
<address>Apache/2.2.22 (Debian) Server at piwik.example.it Port 443</address>
</body></html>

You can restart the import of "access.log.1" from the point it failed by specifying --skip=0 on the command line.

Trying to re-run with --skip i get the same error.
Anyway checking on Piwik web interface i can see updated data, so (hopefully) the import work fine.
Here the full python script command:

python /home/example/example.it/piwik/misc/log-analytics/import_logs.py --url=https://piwik.example.it --enable-http-errors --enable-http-redirects --enable-static --enable-bots --add-sites-new-hosts --enable-reverse-dns --enable-http-errors --enable-http-redirects --show-progress --show-progress-delay=10 --enable-static access.log.1

PHP config:
post_max_size = 100M
upload_max_filesize = 100M
(log file that case this error is only 9Mb, uncompressed)

Piwik: 2.13.1
OS: Debian 7
Python: 2.7.3

Thanks

@mattab commented on July 15th 2015 Owner

Hi @tsumi
When you get error 413 Request Entity Too Large try to --recorder-max-payload-size=50 or so (it uses default 200 which may be too large for you).

This Issue was closed on July 15th 2015
Powered by GitHub Issue Mirror