# CSV imports fail - stalling In Progress, Runtime Less than 1 second

**URL:** <https://forum.mautic.org/t/csv-imports-fail-stalling-in-progress-runtime-less-than-1-second/25199>\
**Category:** Product Support\
**Tags:** mautic-4\
**Created:** [August 27, 2022, 4:11pm UTC](https://forum.mautic.org/t/csv-imports-fail-stalling-in-progress-runtime-less-than-1-second/25199 "2022-08-27T16:11:53Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![modifiedcontent](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/modifiedcontent/32/511_2.png) [@modifiedcontent](https://forum.mautic.org/u/modifiedcontent)\
**Post date:** [November 7, 2022, 5:46pm UTC](https://forum.mautic.org/t/csv-imports-fail-stalling-in-progress-runtime-less-than-1-second/25199/21 "2022-11-07T17:46:22Z")

</div>

I would NOT delete random rows!

Could you try changing collation to utf8mb4\_unicode\_ci - same for all tables ideally I guess - and then optimize/fix the table?

---

<div class="post-metadata">

**Author:** ![ezzat](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ezzat/32/825_2.png) [@ezzat](https://forum.mautic.org/u/ezzat)\
**Post date:** [November 7, 2022, 6:41pm UTC](https://forum.mautic.org/t/csv-imports-fail-stalling-in-progress-runtime-less-than-1-second/25199/22 "2022-11-07T18:41:33Z")

</div>

I did just that and no cigar ☹ ☹

[[Album] imgur.com ![](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/c/cca9239a2c5dffec3423f225048b7ad3a9f6ec22.jpeg "imgur.com") ](https://imgur.com/a/JFVuUQO)

---

<div class="post-metadata">

**Author:** ![ezzat](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ezzat/32/825_2.png) [@ezzat](https://forum.mautic.org/u/ezzat)\
**Post date:** [November 7, 2022, 7:00pm UTC](https://forum.mautic.org/t/csv-imports-fail-stalling-in-progress-runtime-less-than-1-second/25199/23 "2022-11-07T19:00:56Z")

</div>

Tried again since last time i didn’t optimize, noticed not al tables were mb4,

It seems like its not possible:

#1833 - Cannot change column ‘id’: used in a foreign key constraint ‘FK\_CA0A2625A8752772’ of table ‘vLYHJqU8Br9orB.email\_stats’

[[Album] imgur.com ![](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/b/b1381206289d8ffc0cf41f9cfb913d0a92fa4cd4.jpeg "imgur.com") ](https://imgur.com/a/5idUaZQ)

---

<div class="post-metadata">

**Author:** ![ezzat](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ezzat/32/825_2.png) [@ezzat](https://forum.mautic.org/u/ezzat)\
**Post date:** [November 7, 2022, 7:15pm UTC](https://forum.mautic.org/t/csv-imports-fail-stalling-in-progress-runtime-less-than-1-second/25199/24 "2022-11-07T19:15:44Z")

</div>

Deleted segment NO EMAIL which worked perfectly before and the segment update went through.

Will keep an eye on logs, I assume at some point whatever the root issue is will reappear.

---

<div class="post-metadata">

**Author:** ![modifiedcontent](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/modifiedcontent/32/511_2.png) [@modifiedcontent](https://forum.mautic.org/u/modifiedcontent)\
**Post date:** [November 8, 2022, 12:27am UTC](https://forum.mautic.org/t/csv-imports-fail-stalling-in-progress-runtime-less-than-1-second/25199/25 "2022-11-08T00:27:00Z")

</div>

Did you use command line/ssh when you tried to convert to utf8mb4\_unicode\_ci? I think I had the same problem with a bunch of tables, but was later able to convert them using PHPMyAdmin with no issues.

---

<div class="post-metadata">

**Author:** ![modifiedcontent](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/modifiedcontent/32/511_2.png) [@modifiedcontent](https://forum.mautic.org/u/modifiedcontent)\
**Post date:** [November 14, 2022, 12:59am UTC](https://forum.mautic.org/t/csv-imports-fail-stalling-in-progress-runtime-less-than-1-second/25199/26 "2022-11-14T00:59:17Z")

</div>

Another regular import. Companies import went through fine. Contacts import stalls with the same ‘Less than 1 second - 0%’ error again.

So I have to ‘optimize’ the lead\_event\_log table again in PHPMyAdmin I guess…

**Edit:** …and yes, the same csv file went through after “optimizing” that table again. Why does this keep happening? Any way/plans to fix it?

---

<div class="post-metadata">

**Author:** ![modifiedcontent](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/modifiedcontent/32/511_2.png) [@modifiedcontent](https://forum.mautic.org/u/modifiedcontent)\
**Post date:** [December 2, 2022, 11:48am UTC](https://forum.mautic.org/t/csv-imports-fail-stalling-in-progress-runtime-less-than-1-second/25199/28 "2022-12-02T11:48:02Z")

</div>

Just fyi Mautic developers/managers, I still have to regularly “optimize” lead\_event\_log to get around this error, so this is not solved. Any suggestions/fixes still very much appreciated.

---

<div class="post-metadata">

**Author:** ![modifiedcontent](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/modifiedcontent/32/511_2.png) [@modifiedcontent](https://forum.mautic.org/u/modifiedcontent)\
**Post date:** [January 7, 2023, 2:02pm UTC](https://forum.mautic.org/t/csv-imports-fail-stalling-in-progress-runtime-less-than-1-second/25199/29 "2023-01-07T14:02:31Z")

</div>

Found this command, probably quicker than PHPMyAdmin next time I’ll need this:

php bin/console doctrine:query:sql “OPTIMIZE LOCAL TABLE lead\_event\_log;”

---

<div class="post-metadata">

**Author:** ![modifiedcontent](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/modifiedcontent/32/511_2.png) [@modifiedcontent](https://forum.mautic.org/u/modifiedcontent)\
**Post date:** [July 13, 2023, 8:27pm UTC](https://forum.mautic.org/t/csv-imports-fail-stalling-in-progress-runtime-less-than-1-second/25199/30 "2023-07-13T20:27:57Z")

</div>

This problem is still there. I know nobody at Mautic cares, just wanted to mention it. And the command from the previous comment doesn’t work with fancy quotes of course, so use this:

```auto
php bin/console doctrine:query:sql "OPTIMIZE LOCAL TABLE lead_event_log;"

```

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [July 14, 2023, 8:42am UTC](https://forum.mautic.org/t/csv-imports-fail-stalling-in-progress-runtime-less-than-1-second/25199/31 "2023-07-14T08:42:14Z")

</div>

Can you plz check if you have any index on the email column in leads?  
That solved it for me.

---

<div class="post-metadata">

**Author:** ![modifiedcontent](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/modifiedcontent/32/511_2.png) [@modifiedcontent](https://forum.mautic.org/u/modifiedcontent)\
**Post date:** [July 16, 2023, 2:51pm UTC](https://forum.mautic.org/t/csv-imports-fail-stalling-in-progress-runtime-less-than-1-second/25199/32 "2023-07-16T14:51:54Z")

</div>

Thanks @joeyk. How/where would I check if I ‘have any index on the email column in leads’? How would I fix it if I don’t have any index?

There is an option ‘Add AUTO\_INCREMENT value’ that you can apply to a table in PHPMyAdmin; is that adding an index? Or should I select all columns in the table and then click ‘index’ after ‘with selected’?

Or should I do “ALTER TABLE `leads` ADD INDEX(`email`);”?

Could unselecting the option ‘Add constraints’ from lead\_event\_log prevent future issues?

Optimizing the table via the SSH command in my previous comment failed, probably because ‘Table does not support optimize’; PHPMyAdmin does ‘recreate + analyze’ when you try optimize. That did “fix” it again. There is probably a command line way to do ‘recreate + analyze’. I’ll figure that out next time…

[Previous page](https://forum.mautic.org/t/csv-imports-fail-stalling-in-progress-runtime-less-than-1-second/25199.md?page=1)
