Maximum number of record in database tables for Windows servers

Maximum number of record in database tables for Windows servers

by Mari Cruz García -
Number of replies: 8

Hello,

We have a Moodle site hosted in a Windows 2008-IIS7 server. It is a medium size site (number of users around 300, less than 60 courses) but it will be used to support another MSc.

In the 2.6, I have read that:

Windows OS is not suitable for large Moodle installations because PHP for Windows does not support integers above 2 millions - maximum file size is 2GB and database tables cannot contain more than 2 million records. Please consider 64bit Linux or other unix-like OS for all large Moodle servers.


However, the warning about the database tables does not appear in the documentation for Moodle 2.7:

The backup of large courses is not a problem for us, but I want to know if I should be worried about the 2 million records limit,

In MySQL, how can I measure the number of records in tables?

Thank you very much for your advise.
Regards,
Mari Cruz
Average of ratings: -
In reply to Mari Cruz García

Re: Maximum number of record in database tables for Windows servers

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

That page was wrong, which is why we fixed the 2.7 version of the documentation. I have not copied the corrected paragraph into the 2.6 docs.

In reply to Tim Hunt

Re: Maximum number of record in database tables for Windows servers

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
You are partially wrong Tim, Moodle uses integers for id numbers in database tables (see $DB->insert_record() for example), there are also other places that use large integers from DB - we did have multiple problems with this before. There was million which should be billion - that should make it less serious.
In reply to Petr Skoda

Re: Maximum number of record in database tables for Windows servers

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
Another problematic area is 64-bit unix timestamps. I guess that might be another showstopper for MS.
In reply to Petr Skoda

Re: Maximum number of record in database tables for Windows servers

by Guillermo Madero -

Hi Petr,

If this is about the "PHP for Windows does not support integers above 2 millions" text, I think I'll have to join the people-that-do-not-understand-some-things group as I just recently answered a similar post:

https://moodle.org/mod/forum/discuss.php?d=260069#p1129548

with:

regarding the "integers above 2 millions... that is definitely wrong: 
http://www.php.net/manual/en/language.types.integer.php

The referred PHP manual page says:

The size of an integer is platform-dependent, although a maximum value of about two billion is the usual value (that's 32 bits signed).

If the Moodle documentation page is not wrong, then it certainly is ambiguous. Of course, I may be misunderstanding something here.

In reply to Guillermo Madero

Re: Maximum number of record in database tables for Windows servers

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
I have updated that Moodle docs pages http://docs.moodle.org/27/en/Windows_installation#Known_problems and http://docs.moodle.org/26/en/Windows_installation#Known_problems today.

Anyway I would not recommend to run Moodle on Windows except for demonstration purposes because no part of the stack that Moodle requires was designed for Windows. Sooner or later you will hit major problems there...
In reply to Petr Skoda

Re: Maximum number of record in database tables for Windows servers

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

It took the OU Moodle install about 3 years to reach an id of one billion, and that was only in the log table. So, yes, for very large sites, it is a problem eventually, but that is not a reason to spread FUD.

In reply to Tim Hunt

Re: Maximum number of record in database tables for Windows servers

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
hehe, Tim, yes - using Moodle on Windows is a constant fear, uncertainly and doubt - that is why I do not recommend Windows for any PHP server apps