Results 1 to 4 of 4

Thread: Importing of leads fails with memory exhaustion

  1. #1
    GaryWayneSmith is offline Junior Member
    Join Date
    Sep 2007
    Posts
    4

    Default Importing of leads fails with memory exhaustion

    Hello,

    We have a csv export from an access database that holds about 10k leads. These are pretty much direct mail leads. When trying to import them, Apache dies with an error about memory exhaustion. The error specifically happens when memory gets to 100mb. I've looked through a couple of the existing threads and they recommend tweaking memory and cutting down on the number of records imported. I've tweaked out php.ini to allow for 300mb, but still it dies at 100mb. I've tried pruning it down into batches of 1000 messages and it still fails, batches of 500 and have had mixes results.

    Is it possible to do a import directly into MySQL via SQL? Someone mentioned in a thread that the ID field must be created through SugarCRM but since these are new records and don't have a reference as of yet, I don't understand why this would be, when it comes to leads that is.

    What's the best approach to resolve this problem?

  2. #2
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: Importing of leads fails with memory exhaustion

    Quote Originally Posted by GaryWayneSmith
    Hello,

    We have a csv export from an access database that holds about 10k leads. These are pretty much direct mail leads. When trying to import them, Apache dies with an error about memory exhaustion. The error specifically happens when memory gets to 100mb. I've looked through a couple of the existing threads and they recommend tweaking memory and cutting down on the number of records imported. I've tweaked out php.ini to allow for 300mb, but still it dies at 100mb. I've tried pruning it down into batches of 1000 messages and it still fails, batches of 500 and have had mixes results.
    Did you reboot Apache after modifying your PHP.INI file?

    Quote Originally Posted by GaryWayneSmith
    Is it possible to do a import directly into MySQL via SQL? Someone mentioned in a thread that the ID field must be created through SugarCRM but since these are new records and don't have a reference as of yet, I don't understand why this would be, when it comes to leads that is.
    The ID value is the unique identifier within the table, thus you cannot simply ignore it. If you do, you wouldn't be able to import more than one lead because the second one with a blank ID value would violate the restriction that the value has to be unique.

    If you must import via external tools, you can create the ID for each row ahead of time using the create_guid() function in utils.php.

    Another option would be to leverage the SOAP API to insert the data into Sugar. The API would handle the ID portion for you.
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  3. #3
    GaryWayneSmith is offline Junior Member
    Join Date
    Sep 2007
    Posts
    4

    Default Re: Importing of leads fails with memory exhaustion

    Quote Originally Posted by Angel
    Did you reboot Apache after modifying your PHP.INI file?

    The ID value is the unique identifier within the table, thus you cannot simply ignore it. If you do, you wouldn't be able to import more than one lead because the second one with a blank ID value would violate the restriction that the value has to be unique.

    If you must import via external tools, you can create the ID for each row ahead of time using the create_guid() function in utils.php.

    Another option would be to leverage the SOAP API to insert the data into Sugar. The API would handle the ID portion for you.
    Angel,

    Thanks for the follow up.

    I tried several things, I showdown the entire Xen instance, allocated 2GB of ram, etc, still no luck. What I did, since I'm pretty fluent at sql, was to create a cusotm insert statement batch and imported them then all directly to mysql. I know that's not supported. I used a unique, incrementing sequence, and didn't find any ill effects thus far.

    Gary

  4. #4
    sacramentojoe is offline Sugar Community Member
    Join Date
    Nov 2005
    Posts
    447

    Default Re: Importing of leads fails with memory exhaustion

    Quote Originally Posted by GaryWayneSmith
    Angel,

    Thanks for the follow up.

    I tried several things, I showdown the entire Xen instance, allocated 2GB of ram, etc, still no luck. What I did, since I'm pretty fluent at sql, was to create a cusotm insert statement batch and imported them then all directly to mysql. I know that's not supported. I used a unique, incrementing sequence, and didn't find any ill effects thus far.

    Gary
    Having the same issue.
    Can you share your script?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Newbie - Importing Leads from a CSV File
    By Matt Moreau in forum Help
    Replies: 3
    Last Post: 2007-09-07, 07:07 PM
  2. Account Name not importing into Leads
    By hubdigital in forum Help
    Replies: 0
    Last Post: 2006-07-04, 01:26 AM
  3. Help importing Leads
    By Proware in forum Help
    Replies: 1
    Last Post: 2006-04-24, 03:09 PM
  4. Replies: 3
    Last Post: 2005-06-16, 01:52 PM
  5. Replies: 0
    Last Post: 2005-04-08, 11:26 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •