Disk quota exceeded (122) error when working with Moodle

Website URL


Error Message

Warning : session_start(): open(/home/vol19_2/epizy.com/epiz_34088188/htdocs/edu/moodledata/sessions/sess_3e135b52c33690ff8a2e77363a17b67f, O_RDWR) failed: Disk quota exceeded (122) in /home/vol19_2/epizy.com/epiz_34088188/htdocs/edu/lib/classes/session/handler.php on line 45

Warning : session_start(): Failed to read session data: files (path: /home/vol19_2/epizy.com/epiz_34088188/htdocs/edu/moodledata/sessions) in /home/vol19_2/epizy.com/epiz_34088188/htdocs/edu/lib/classes/session/handler.php on line 45

Other Information

hello, I have the following problem. I put LMS MOODLE on hosting and was developing my course. Today, when logging into the administrator account, I get the following error (1 screen)

Then I tried to go in and look at the Moodle settings in the control panel and there it also gives an error (2 screen)

After studying the errors, most say that disk space has run out, disk quota exceeded, although this is not the case (3 screen)

Can you tell me what the problem is ?

the side panel takes 24h to update

1 Like

Hmmm…is the disk on the server running out of space?

no, it didn’t take up much space here is a screenshot, they wrote with a comment above that the counter works 1 time in 24 hours, I will check

Thaks for help, I will check during the day, nothing has changed yet

You can try with another hosting account to rule out physical server running out of storage

A “quota” error means that the limit is hit for the account, not for the server. If the server was full, you’d see an error like “No space left on device”.

It’s really stupid you’re getting this error though. Or rather, really stupid from Moodle.

Our servers by default have a session save path set. That’s on a separate storage device that’s optimized for fast, effortless session storage, which doesn’t have account level limits on how much sessions you have. But for some reason, the Moodle developers thought it was a good idea to override the session storage directory so the session files are stored directly on the account, which is slower, less secure, and subject to inode limits. Had Moodle not changed decided to change this behavior, you wouldn’t have this issue.


I didn’t quite understand what you wanted to say, is it possible to somehow transfer my moodle work to another hosting or will I have to do it all over again?

is it possible to somehow clear the session storage to solve this problem ?

I suppose you could try to clear the session storage by hand.

Looking at the error message, it appears that Moodle stores sessions in the directory htdocs/edu/moodledata/sessions/ in your account. If you go into that directory and delete everything there, it should free up some inodes with minimal impact to visitors.


Hello, thanks for the advice, I did everything as you said, but nothing has changed, the error remains

Try adding the following two lines to your config.php file (below what should be line 25, $CFG->directorypermissions = 0777; line)

$CFG->session_handler_class = '\core\session\file';
$CFG->session_file_save_path = session_save_path();



Thank you very much, this method helped me, please explain what was wrong and how these 2 commands helped me.

1 Like

As explained by the Admin above, Moodle by default changes the default session storage to a folder stored inside your account, subjecting it to inode limits and breaking your website as a result.

Those 2 lines were the ones given by Moodle in the documentation link I sent above to change the session storage path, in particular this line:

$CFG->session_file_save_path = session_save_path();

set the session storage to session_save_path(), which is a PHP function that fetches the current directory used to save session data (in our case, since this is the initial configuration, this fetched InfinityFree’s default session storage which isn’t subjected to the inode limit your account is).

You can read more about the function on PHP’s manual if you’re interested: PHP: session_save_path - Manual


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.