Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9274029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:15:22+00:00 2026-06-18T16:15:22+00:00

We have an old facebook app, running smoothly written in native php. This month

  • 0

We have an old facebook app, running smoothly written in native php.

This month we decided to rewrite it in zend-framework 2. Yesterday, after switching to new app it crashed our server with lots of out of memory errors. So we turned back to old app.

I installed xdebug to profile the app. Using memory_get_peak_usage() function i noticed high memory usage.

In the old app, a static page uses only 1 mb memory. But the new one using 7-8 mb approximately on the same page.

Here’s the top two rows from webgrind:

   Function                                     Invocation Count    Total Self Cost    Total Inclusive Cost
   Composer\Autoload\ClassLoader->loadClass     224                 23.31       47.20
   Composer\Autoload\ClassLoader->findFile      224                 9.57        10.23

Also tried tha apache’s ab tool

   ab -n 50 -c 5 -C PHPSESSID=SESSIONID http://myhost.com

Result is:

   Percentage of the requests served within a certain time (ms)
   50%    368
   66%    506
   75%    601
   80%    666
   90%   1073
   95%   1812
   98%   2278
   99%   2278
   100%   2278 (longest request)

All these results from the production server not localhost.

Is 7-8 mb for a single page normal? If not, how can i reduce it? Should i look for it in zf2 or composer?

I can give code samples if you need. Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T16:15:24+00:00Added an answer on June 18, 2026 at 4:15 pm

    I spent a day to figure out problem. Tried xdebug, xhprof. There was no problem in the code.

    We switched back to 2.0.0 and problem solved. I don’t know what is wrong with new versions, for now stick with the 2.0.0.

    Overall memory usage is around 4mb, no crashes.

    composer.json:

    "zendframework/zendframework": "2.0.0", 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an old Facebook app that installs on Facebook Pages. The tab page
I maintain an old web app written in C++ & javascript. I have been
I have this old question but no answer works for me from online, the
I have an old iOS app that I never distributed and am now trying
I should have asked this in Facebook developer forum instead, but somehow I can't
I have in my app a facebook share button, a tweet button. My app
I have my facebook app in a tab on my facebook page. If you
I'm a refugee from the old Facebook Developer Toolkit porting my app to the
I have created an android app to login using facebook, create events on facebook,
I have a web app that allows users to tie their Facebook account to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.