#39885 [Com]: memory leak when doing loads of INSERT's and there are duplicate key errors

From: Date: Tue, 01 May 2007 16:24:13 +0000
Subject: #39885 [Com]: memory leak when doing loads of INSERT's and there are duplicate key errors
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-112146@lists.php.net to get a copy of this message
ID: 39885 Comment by: brunobg at gmail dot com Reported By: jacques@php.net Status: No Feedback Bug Type: MySQL related Operating System: Redhat Linux RHEL4 PHP Version: 5.2.0 New Comment: I'm getting a similar behavior, but using mysqli. I'm trying to isolate the cause and create a test program that reproduces this bug. Please let me know if I can help with any other information. I'm running slackware 11.0, instead of RHEL4, with kernel 2.6.17.13, php 5.2.0, mysql 5.0.24a. Previous Comments: ------------------------------------------------------------------------ [2006-12-27 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2006-12-19 13:50:44] tony2001@php.net Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. ------------------------------------------------------------------------ [2006-12-19 13:45:47] jacques@php.net Description: ------------ When doing loads of INSERT INTO table VALUES (col1,col2,col3,...) VALUES (value1, value2, value3, ....) and the row primary key already exists, the mysql extension leaks memory. If the row does not exist, the mysql extension does not leak memory. It uses more than 1.2G+ of RAM. I've tried using references to the result set etc. and it makes no difference to the memory utilization. Reproduce code: --------------- Working on getting reproduce to contain nothing proprietary. Expected result: ---------------- I would expect it to continue using around 7Mb of RAM, not 1.2Gb+. Actual result: -------------- 24968 mysql_ad 16 0 1179m 616m 1188 S 19.0 30.4 1:42.77 php ... 24968 mysql_ad 16 0 1211m 649m 1188 S 5.0 32.0 1:45.73 php ... 24968 mysql_ad 16 0 1284m 721m 1188 R 41.0 35.6 1:52.29 php ... 24968 mysql_ad 16 0 1442m 877m 1188 R 20.6 43.3 2:06.87 php ... 24968 mysql_ad 16 0 1554m 847m 1164 S 38.9 41.8 2:16.74 php ... 24968 mysql_ad 16 0 1601m 894m 1164 S 36.6 44.2 2:20.88 php ... 24968 mysql_ad 16 0 1646m 939m 1164 S 46.6 46.3 2:24.70 php ... 24968 mysql_ad 16 0 2304m 904m 1124 S 62.0 44.7 3:19.94 php ... 24968 mysql_ad 16 0 2359m 960m 1124 S 62.5 47.4 3:24.56 php ... 24968 mysql_ad 16 0 2403m 1.0g 1124 S 61.8 49.6 3:28.30 php ... 24968 mysql_ad 16 0 2436m 1.0g 1124 R 64.2 51.2 3:31.10 php ... 24968 mysql_ad 16 0 2481m 1.1g 1124 R 62.5 53.4 3:34.84 php ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39885&edit=1

« previous php.bugs (#112146) next »