Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request Entity Too Large #8240

Closed
tsumi opened this issue Jun 29, 2015 · 1 comment
Closed

Request Entity Too Large #8240

tsumi opened this issue Jun 29, 2015 · 1 comment
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@tsumi
Copy link

tsumi commented Jun 29, 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
Copy link
Member

mattab commented Jul 15, 2015

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).

@mattab mattab closed this as completed Jul 15, 2015
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Jul 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants