Out of memory error

Discussion in 'Troubleshooting' started by slinky, Nov 21, 2010.

  1. slinky

    slinky Member

    Joined:
    Jul 15, 2010
    Messages:
    200
    In doing a basic member search, I got this error:

    Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 8208 bytes) in /home/mysite/public_html/amember/db.inc.php on line 40

    Is there a setting in amember that will help? This is a lot of memory for this function (I would think you might need a better, more efficient query) but I do have 150,000 members currently loaded into amember. I may need an .htaccess placed in the amember directory but perhaps you can address this in an update as well. Doing a general search should only provide 20 or so results at a time with links.
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    You can contact your host to increase the memory allocated.

    David
  3. slinky

    slinky Member

    Joined:
    Jul 15, 2010
    Messages:
    200
    I am the host. I run a dedicated server. I've got plenty of memory running in the machine but I'm wondering if it is my php limit that is cutting it short. I don't want to raise it globally.

    There is also no reason why amember should require more memory than vBulletin 4, which is a known resource hog.
  4. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Do you use custom fields with "common" type? Try to convert these fields to SQL.
    For common fields aMember first query all records from database and then decode data column and search in it. And this will require a lot of memory. If you will use SQL fields serach will be done by SQL query.
  5. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    Yes, converting field to SQL type must help. If it does not, please contact us via helpdesk, and we will definitely help - free of charge, and quickly.
    Extending the memory limit is definitely not a choice here - it already takes 512MB of RAM.
  6. slinky

    slinky Member

    Joined:
    Jul 15, 2010
    Messages:
    200
    Guys - thank you. I may end up giving you guys a call on this one as it is a huge import...
  7. slinky

    slinky Member

    Joined:
    Jul 15, 2010
    Messages:
    200
    Alexander - so I don't have to ask you to do much work, how does one "convert" these fields to SQL. I don't even know the difference between the two. I'm not even sure why I'd use common fields. I'm hoping this won't require me to reset up everything from scratch!
  8. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    You can do this from aMember CP -> Add fields
    Just edit field and change it type to SQL.
  9. slinky

    slinky Member

    Joined:
    Jul 15, 2010
    Messages:
    200
    I'm still getting this out of memory error when searching for all members to get a long list. I guess I'll have to email you guys...
  10. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Ok. Please contact us in helpdesk and explain how to recreate issue exactly we will check what can be wrong.

Share This Page