Bug #73807 [Opn]: Performance problem with processing post request over 2000000 chars
| From: | pparadowski at media4u dot pl | Date: | Fri, 20 Jan 2017 11:03:36 +0000 |
| Subject: | Bug #73807 [Opn]: Performance problem with processing post request over 2000000 chars | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-206754@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73807&edit=1
ID: 73807
User updated by: pparadowski at media4u dot pl
Reported by: pparadowski at media4u dot pl
Summary: Performance problem with processing post request
over 2000000 chars
Status: Open
Type: Bug
Package: Performance problem
Operating System: FreeBSD 9.4-11.0
-PHP Version: 5.6.29
+PHP Version: 5.6.29, 7.0
Block user comment: N
Private report: N
New Comment:
same on PHP 7.0
Previous Comments:
------------------------------------------------------------------------
[2016-12-23 12:52:50] pparadowski at media4u dot pl
Description:
------------
Since php 5.6.x an issue with data sending using POST method is noticeable only on FreeBSD servers.
When we try to send long text post with over 2000000 characters to FreeBSD server we got a long
running request
With the number of characters the processing time substantially increases as can be seen below in
the tests that we carried out:
with 2000000 characters the time is as follows:
FreeBSD - 2,5s
Ubuntu/Linux - 64ms
with 10000000 characters the time is as follows:
FreeBSD - 50,71s
Ubuntu/Linux - 100ms
Please note that we used Apache 2.4 and PHP with the same configurations on the servers.
The problem was not present in the previous PHP 5.4 on FreeBSD.
Configure Command
'./configure' '--with-layout=GNU' '--localstatedir=/var'
'--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all'
'--enable-libxml' '--enable-mysqlnd' '--with-libxml-dir=/usr/local'
'--with-pcre-regex=/usr/local' '--with-zlib-dir=/usr'
'--program-prefix=' '--disable-cli' '--disable-cgi'
'--with-apxs2=/usr/local/sbin/apxs' '--with-regex=php'
'--with-zend-vm=CALL' '--disable-ipv6' '--prefix=/usr/local'
'--mandir=/usr/local/man' '--infodir=/usr/local/info/'
'--build=amd64-portbld-freebsd9.3' 'build_alias=amd64-portbld-freebsd9.3'
'CC=cc' 'CFLAGS=-O2 '-pipe' '-fstack-protector'
'-fno-strict-aliasing'' 'LDFLAGS= '-fstack-protector''
'LIBS=-lpthread' 'CPPFLAGS=' 'CPP=cpp' 'CXX=c++'
'CXXFLAGS=-O2 '-pipe' '-fstack-protector'
'-fno-strict-aliasing''
Loaded Modules
core mod_so http_core mod_authn_file mod_authn_dbm mod_authn_anon mod_authn_core mod_authz_host
mod_authz_groupfile mod_authz_user mod_authz_dbm mod_authz_owner mod_authz_core mod_access_compat
mod_auth_basic mod_auth_digest mod_file_cache mod_cache mod_cache_disk mod_reqtimeout mod_include
mod_filter mod_charset_lite mod_deflate mod_proxy_html mod_mime mod_log_config mod_logio mod_env
mod_mime_magic mod_cern_meta mod_expires mod_headers mod_usertrack mod_unique_id mod_setenvif
mod_version mod_proxy mod_proxy_http mod_ssl prefork mod_unixd mod_status mod_autoindex mod_asis
mod_info mod_cgi mod_vhost_alias mod_negotiation mod_dir mod_imagemap mod_actions mod_speling
mod_userdir mod_alias mod_rewrite mod_php5
PHP.ini changes:
post_max_size 256M 256M
Test script:
---------------
<?php
if (!empty($_POST)) {
if (isset($_POST['data'])) {
echo "OK!";
die();
} else {
echo "NOPE!";
die();
}
}
$imagedata = file_get_contents("1.csv");
$base64 = base64_encode($imagedata);
?>
<form method="post">
<input type="hidden" name="data" value="<?php echo substr($base64,
0, 10000000); ?>">
<button>SEND</button>
</form>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73807&edit=1