Fatal error: Allowed Memory Size Bytes Exhausted

Table of Contents

The memory limit error can appear when the allocated PHP memory gets exhausted or is needed more than the allocated memory, to fix up the problem, you can validate the steps below to fix the problem.

1- First of all, go to ASL Settings and check the memory limit, if it is less than 128M, you should increase it first before you move on.

blank
Memory Limit is only available since version 4.8.20

2- Open the hour CSV file, and make sure that all the required columns have the header and that they must be in the small case.

blank
Column Headers must be a small case
blank
Example of CSV Garbage Data

3- Check the file size of your CSV file, if the file size is in MBs, that means either you have too much data or there is garbage data at the end of the file, and it will definitely exhaust the PHP memory during the import process.

blank
A file size of 4MB most likely be exhausted if the server memory limit is set to default (128M)

How to resolve the problem? #

If you have validated your CSV file by the steps above, and you still have a large CSV file to import you have two options.

1- You can increase the memory limit of your PHP configuration.
2- You can divide the content of your CSV file into multiple CSV files (chunks) and import them.