Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94007 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34329 invoked from network); 15 Jun 2016 13:07:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jun 2016 13:07:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=j.boggiano@seld.be; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=j.boggiano@seld.be; sender-id=pass Received-SPF: pass (pb1.pair.com: domain seld.be designates 74.125.82.44 as permitted sender) X-PHP-List-Original-Sender: j.boggiano@seld.be X-Host-Fingerprint: 74.125.82.44 mail-wm0-f44.google.com Received: from [74.125.82.44] ([74.125.82.44:37467] helo=mail-wm0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 21/C0-27860-91351675 for ; Wed, 15 Jun 2016 09:07:37 -0400 Received: by mail-wm0-f44.google.com with SMTP id a66so23967277wme.0 for ; Wed, 15 Jun 2016 06:07:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seld-be.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=kznAxNbqRSjb/qUnRb0LZnosLfOlsFpt8NTv/iZJWaQ=; b=T7ogZh1moWz+svv9qQVUhVDRuWqCO17gK7+uR2RW27uMA1c8v2pM5Jq71JIbj5Lsa4 UlwDWkcfpYoF/EiGphf4sd4VTwv2i7VG//yjtVRKPzKMjg4WAPD+VlBeN4TkMEfqvfFl sXTWPR9Tg2OG72U9w6s5egmUv/9Ik3bZPFowASDWZDOgGfF7Bfs7GNbn8UmzgCSQLixK 3PCJIQBUhuzCAmxvkrFT+9RSSqUGjgYXusVYzr6uGbUwvkAxIzE+41lUPt8oZTSrk0Gf VeQ9TdyE4YJjRBCNuyVjz1R4+8OYeRGDLMdSOwJliVi4jaJdDOAnA5EK4y7Mk37tpmj8 lotg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=kznAxNbqRSjb/qUnRb0LZnosLfOlsFpt8NTv/iZJWaQ=; b=d1jGIi7Pv1RGJV1VHHiT+qJ8yV5s5ULpjFOyYiMHKKYrX68x8/KN9X2awx7VPaVyHG xmWc/b6Y9P2tIxUaMIA+WqBEp1vi1O57/8WEFtPrhAbH1zzKP/FjL+pac17lhxRakdf5 KtLayOMl5RCqbHdP7ioBGrzwCMlYB/tkN6aSn1l0vpoUznLW3L1YlfYP85fkw8kmb9+6 tyU2FgbOpppaDNoauEFVlYhrsA78wkidtRx3vvL1W+NaNs7a7+QdqzlbrE2wm79ndNRV wzZwexLtXRvZ8a6eESyXTBgsrcXBur61ZsiuFG+yC15PrW5se8+ekT3H91WFZWA+ebpS s4gw== X-Gm-Message-State: ALyK8tIdfK9BgLxMSPQLqCN/aIzVBii5tZ3K5awKGdNB25gnoD4ZaWZppR30ODBJIZ/ZyA== X-Received: by 10.194.103.105 with SMTP id fv9mr11126338wjb.162.1465996054240; Wed, 15 Jun 2016 06:07:34 -0700 (PDT) Received: from [192.168.0.2] (cpc74585-lewi13-2-0-cust978.2-4.cable.virginm.net. [82.25.75.211]) by smtp.googlemail.com with ESMTPSA id o2sm11796179wjp.26.2016.06.15.06.07.32 for (version=TLSv1/SSLv3 cipher=OTHER); Wed, 15 Jun 2016 06:07:32 -0700 (PDT) To: internals@lists.php.net References: Message-ID: Date: Wed, 15 Jun 2016 14:07:37 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PHP allocating too much memory From: j.boggiano@seld.be (Jordi Boggiano) On 15/06/2016 14:01, Peter LeBrun wrote: > Hi - > > I'm getting the following error in php7.0.5: > > Fatal Error: Allowed memory size of 536870912 bytes exhausted (tried to > allocate 140729445144864 bytes) > > If it's relevant, we're using dblib+freetds. > > I can't reproduce the issue deterministically; the best I can do is to > repeatedly curl an endpoint and something like 30% of the requests will > fail due to the above error. > > The weirdest part about this is that PHP is somehow trying to allocate > 140TB of memory. > > Has anyone seen anything like this? Any insights would be appreciated. I have hit that due to an opcache bug in handling of constant arrays on classes. Something like: class Foo { const BLA = []; } This was fixed in 5.6.15 [1] which came out before PHP7 though, so I'd imagine that isn't the exact problem you are hitting, but it might be related. [1] https://bugs.php.net/bug.php?id=70795 Cheers -- Jordi Boggiano @seldaek - http://seld.be