# Large leads import - Stuck

**URL:** <https://forum.mautic.org/t/large-leads-import-stuck/2402>\
**Category:** Product Support\
**Created:** [September 24, 2015, 7:57am UTC](https://forum.mautic.org/t/large-leads-import-stuck/2402 "2015-09-24T07:57:05Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![karibu](https://avatars.discourse-cdn.com/v4/letter/k/c6cbf5/32.png) [@karibu](https://forum.mautic.org/u/karibu)\
**Post date:** [September 24, 2015, 7:57am UTC](https://forum.mautic.org/t/large-leads-import-stuck/2402/1 "2015-09-24T07:57:05Z")

</div>

Hi guys,  
  
  
  
I’m trying to import a lot of 10,000 leads using the CSV import (Very easy by the way), but it stucks at 4800 leads (100 leads per batch)  
  
I have actually \>500,000 leads to import (Cross countries), any idea how to solve this? Or any other way to import the leads?  
  
  
  
Thank you!

---

<div class="post-metadata">

**Author:** ![karibu](https://avatars.discourse-cdn.com/v4/letter/k/c6cbf5/32.png) [@karibu](https://forum.mautic.org/u/karibu)\
**Post date:** [September 24, 2015, 7:57am UTC](https://forum.mautic.org/t/large-leads-import-stuck/2402/2 "2015-09-24T07:57:05Z")

</div>

Hi guys,

I’m trying to import a lot of 10,000 leads using the CSV import (Very easy by the way), but it stucks at 4800 leads (100 leads per batch)  
I have actually \>500,000 leads to import (Cross countries), any idea how to solve this? Or any other way to import the leads?

Thank you!

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [September 24, 2015, 8:00am UTC](https://forum.mautic.org/t/large-leads-import-stuck/2402/3 "2015-09-24T08:00:47Z")

</div>

It would help to know the reason the import got stuck. Could you check Mautic logs (app/logs folder) and server log if there are some error messages?

---

<div class="post-metadata">

**Author:** ![karibu](https://avatars.discourse-cdn.com/v4/letter/k/c6cbf5/32.png) [@karibu](https://forum.mautic.org/u/karibu)\
**Post date:** [September 24, 2015, 8:44am UTC](https://forum.mautic.org/t/large-leads-import-stuck/2402/4 "2015-09-24T08:44:34Z")

</div>

Thanks for the hint.  
From the log I saw some error on PHP execution time out. I’ve raised the max executime time and it works well now.

But I though to upload per batch was solving this issue haha.

Thank you

---

<div class="post-metadata">

**Author:** ![Tyler](https://avatars.discourse-cdn.com/v4/letter/t/35a633/32.png) [@Tyler](https://forum.mautic.org/u/Tyler)\
**Post date:** [September 25, 2015, 5:02am UTC](https://forum.mautic.org/t/large-leads-import-stuck/2402/5 "2015-09-25T05:02:05Z")

</div>

Hi I was wondering if you could lend some assistance. I am having a similar issue with a much smaller batch (1200 records) it seems to stop at ~700, I have considered just uploading the remainder but I thought if there was a solution it would be worth it for the future. What action was necessary to increase the execution time value? I would like to test if this is the appropriate solution for my issue.

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [September 25, 2015, 5:38am UTC](https://forum.mautic.org/t/large-leads-import-stuck/2402/6 "2015-09-25T05:38:21Z")

</div>

It is limitation of the server. Here is article about how to increase that limit [https://www.devside.net/wamp-server/apache-and-php-limits-and-timeouts](https://www.devside.net/wamp-server/apache-and-php-limits-and-timeouts)

---

<div class="post-metadata">

**Author:** ![trops](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/trops/32/3998_2.png) [@trops](https://forum.mautic.org/u/trops)\
**Post date:** [November 2, 2015, 9:49pm UTC](https://forum.mautic.org/t/large-leads-import-stuck/2402/7 "2015-11-02T21:49:54Z")

</div>

Wow, from reading the forums I now realize that the “limit” in the import is BATCH SIZE…I thought it meant TOTAL limit of the import. I have been failing at this all day. Might be awesome to have “batch size” instead of “limit”. That would have saved me a day. 😉 Importing now…

---

<div class="post-metadata">

**Author:** ![alainarae](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@alainarae](https://forum.mautic.org/u/alainarae)\
**Post date:** [July 11, 2017, 2:44pm UTC](https://forum.mautic.org/t/large-leads-import-stuck/2402/8 "2017-07-11T14:44:09Z")

</div>

> [@4501:@trops](#):
>
> Wow, from reading the forums I now realize that the “limit” in the import is BATCH SIZE…I thought it meant TOTAL limit of the import. I have been failing at this all day. Might be awesome to have “batch size” instead of “limit”. That would have saved me a day. 😉 Importing now…

THANK YOU! Super helpful

---

<div class="post-metadata">

**Author:** ![social](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@social](https://forum.mautic.org/u/social)\
**Post date:** [December 4, 2017, 9:19am UTC](https://forum.mautic.org/t/large-leads-import-stuck/2402/9 "2017-12-04T09:19:32Z")

</div>

Enough of my contacts are not getting imported.  
The imports work but miss out the vast majority of emails from the .csv file and only adds a small percentage to the mautic contacts.

Repeatedly importing on the command line with multiple parallel processes helps a bit but still missing lots of email addresses.

[quote]bitnami@debian:/opt/bitnami/apps/mautic/htdocs/app/logs$ ` sudo php /opt/bitnami/apps/mautic/htdocs/app/console mautic:import -l 17000`  
Import 25 with 426907 rows is starting.  
17000/17000 [============================] 100%  
Import has been delayed: unknown  
308600 lines were processed, 9 items created, 306406 items updated, 2185 items ignored in 195.13 s[/quote]

I have a cron job set up as well.

```auto
0,15,30,45 * * * * sudo php /opt/bitnami/apps/mautic/htdocs/app/console mautic:import -l 1000 --no-interaction --no-ansi 2>&1 >> /opt/bitnami/apps/mautic/htdocs/app/logs/mautic.import.txt
```

The only hack seems to be repeatedly manually importing the .csv files again and again even though their status is already Imported & 100%. Each time a few more emails are added!

The import process is too slow and is not working properly, especially for large lists.

` Status Source file Runtime Progress Total rows Inserted Updated Ignored Date Added ID 
Imported Internet_Marketing Real Estate.csv
	1 minute 22 seconds 100% 61656 24098 37557 1 Today, 6:59 am 22
Imported 1million p3.csv
	4 minutes 20 seconds 100% 340350 6672 331635 2043 Today, 5:56 am 21
Imported 1million p3.csv
	1 minute 39 seconds 100% 340350 5343 332973 2034 Yesterday, 10:09 pm 20
Imported 1million p2.csv
	2 minutes 36 seconds 100% 426907 8543 415368 2996 Yesterday, 10:08 pm 19`

Changes to these settings, does improve the above but doesn’t fix the “Import has been delayed: unknown” issue:

1. Increase PHP limits:

`max_execution_time = 600
max_input_time = 600
memory_limit = 1024M`

[https://www.devside.net/wamp-server/apache-and-php-limits-and-timeouts](https://www.devside.net/wamp-server/apache-and-php-limits-and-timeouts)

1. .CSV must be UTF-8 encoded charset:  
Excel \> FILE \> Save As \> Tools \> Web Options \> Encoding \> Save this document as \> Unicode UTF-8  
[https://help.surveygizmo.com/help/encode-an-excel-file-to-utf-8-or-utf-16](https://help.surveygizmo.com/help/encode-an-excel-file-to-utf-8-or-utf-16)

2. Excel \> FILE \> Save As… “CSV (MS-DOS)”

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [February 2, 2020, 10:57pm UTC](https://forum.mautic.org/t/large-leads-import-stuck/2402/10 "2020-02-02T22:57:24Z")

</div>


