Fatal Error on Nutsmail Webmail after Login

countryboy01

Verified User
Joined
Nov 25, 2014
Messages
21
One of my end users are getting the error:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 4097 bytes) in /var/www/html/nutsmail_4.2.1_standalone_basic/functions/imap_general.php on line 129

Now, I know how to resolve this issue, considering that I'e read forums that the main php.ini needs to be edited to match the bytes in MB.

Right now the php.ini is set at 64Mb for Memory. This webmail interface is needing 67Mb.

We also have Squirellmail setup and that does not pose any issues either. I've searched in our error logs and from what I can determine, nothing pops up about this issue.

I'm not wanting to know how to resolve it(like I said, I believe I know how to). I am wanting to know how the issue was caused. Specially since this is the only email account on the domain that is having the issue.
 
One of my end users are getting the error:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 4097 bytes) in /var/www/html/nutsmail_4.2.1_standalone_basic/functions/imap_general.php on line 129

Now, I know how to resolve this issue, considering that I'e read forums that the main php.ini needs to be edited to match the bytes in MB.

Right now the php.ini is set at 64Mb for Memory. This webmail interface is needing 67Mb.

We also have Squirellmail setup and that does not pose any issues either. I've searched in our error logs and from what I can determine, nothing pops up about this issue.

I'm not wanting to know how to resolve it(like I said, I believe I know how to). I am wanting to know how the issue was caused. Specially since this is the only email account on the domain that is having the issue.


If this helps clarify, I am trying to find out what causes this error to generate, like is it because of too many emails in the webmail portion(though they are set at unlimited), Is the server not able to handle the storage capacity of the contents and php script, etc.. I know that I just need to go into the allowed_memory and adjust it from our standard 64 Mb to 128 Mb(since this is requesting 67 Mb at this time).. I would just like to know what triggers, I know it has to be on an individual account basis considering, I can't for the life of me replicate the issue on any other account.
 
The key is to your answer is in the error message you posted in your question:
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 4097 bytes) in /var/www/html/nutsmail_4.2.1_standalone_basic/functions/imap_general.php on line 129
Something in or prior to line 129 in the code is requesting more memory than your default setting?

What? Likely only the nutsmail programmers would know, but you may be able to figure it out if you've got the PHP skills.

Jeff
 
The key is to your answer is in the error message you posted in your question:

Something in or prior to line 129 in the code is requesting more memory than your default setting?

What? Likely only the nutsmail programmers would know, but you may be able to figure it out if you've got the PHP skills.

Jeff

Jeff,

I know our current memory usage is set at 64Mb on the server and this email account needs 67Mb. However, all of our domains/clients use Nutsmail as the default login. Yet this is the only account that seems to be affected. I'm not sure what is special about the error being triggered, I am studying PHP at the moment, but I don't have anywhere near the skills to understand this type of coding yet. This account is requesting 67 Mb of coding in that php file, yet when I look at the file itself, it exactly matches the default pattern of one that you can download online anywhere(or to my eyes it does). I've even compared this one to some other accounts, and they all appear to be the exact same.
 
Also, I was thinking of replacing the /var/www/html/nutsmail_4.2.1_standalone_basic/functions/imap_general.php with a fresh copy to see if that would resolve the issue, or since emails are currently in the box if that would make it worse..

It appears to be affecting only the INBOX folder. The other folders such as Trash, Drafts, Sent, custom are not affected by this error.
 
The key is to your answer is in the error message you posted in your question:

Something in or prior to line 129 in the code is requesting more memory than your default setting?

What? Likely only the nutsmail programmers would know, but you may be able to figure it out if you've got the PHP skills.

Jeff

Also here are lines 117-141 of that code. This is the entire script of this section of the code. I've been trying to locate said source to the best of my limited knowledge, but it's taking awhile to backtrack.

117 /**
118 * Custom fgets function: gets a line from the IMAP server,
119 * no matter how big it may be.
120 * @param stream imap_stream the stream to read from
121 * @return string a line
122 */
123 function sqimap_fgets($imap_stream) {
124 $read = '';
125 $buffer = 4096;
126 $results = '';
127 $offset = 0;
128 while (strpos($results, "\r\n", $offset) === false) {
129 if (!($read = fgets($imap_stream, $buffer))) {
130 /* this happens in case of an error */
131 /* reset $results because it's useless */
132 $results = false;
133 break;
134 }
135 if ( $results != '' ) {
136 $offset = strlen($results) - 1;
137 }
138 $results .= $read;
139 }
140 return $results;
141 }

Also, the Inbox was purged at one point(over 1000+ emails) and even that didn't resolve the issue.
 
I'm not going to try to debug their code for them because I don't use Nutsmail. Perhps someone else will, but I'd suggest asking on their forum or list if they have one. You'll get more eyeballs of peoplel having an interest in the resolution.

Jeff
 
Jeff,

Honestly, I've been trying to find a mailing list/website/forum for nutsmail, but I can't seem to find one. I see all these results with the various domain hosting(Cpanel, VPS, etc) but not a Nutsmail forum itself.
 
Hello,

How many emails does the user has in his folders? I guess the webmail needs more RAM to read/load them all for browsing.
Did you try to temporary move emails to another location?

One of my end users are getting the error:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 4097 bytes) in /var/www/html/nutsmail_4.2.1_standalone_basic/functions/imap_general.php on line 129
 
Hello,

How many emails does the user has in his folders? I guess the webmail needs more RAM to read/load them all for browsing.
Did you try to temporary move emails to another location?

The EU started with 1200 emails. Purged the emails, and currently at 135. The error did not change at all once all the emails were removed. Like I advised, The folders for everything BUT Inbox is working and can access the emails inside.

At this time, The Inbox is purged again(no emails at all) and the error is still displaying, but I can get to the emails on any other folder in the account. Also if I go to "Payments" then go back to Inbox the error comes back.

She currently has the:
Inbox
Sent
Drafts
Spam
Trash
Invoices
Personal
Payments
Requests
Sent Items
Sent Messages

I am about to copy the contents into a dummy(test) account to see if that replicates the issue. My only concern is that I need to verify the account. This is the username that is used for email, FTP, and changes to the Apps, Email, etc(like the Admin User for the domain). So it is not in the same area that the other emails are stored at.

By that is that is the domain admin account email located here? /home/$DomainAdmin/Maildir

I know the other location /home/$DomainAdmin/imap/ is for the other email accounts(test, [email protected], etc)..
 
So Here is an update:

I rsync the contents of the account into a dummy account, the issue replicated. So now on my [email protected] email account, i am getting the same error as the original account.

Does this mean that the issue still resides in the Inbox? Seeing how I can still access all other folders EXCEPT the Inbox?

Also does anyone know a command that I could use that would ONLY copy the contents of the INBOX folder on the server itself(like a variation of cp or rsync)?
 
[Resovled] Fatal Error on Nutsmail Webmail after Login

Resolution:

This should of been the first thing I done with the Rsync Command.

After copying emails from the affected into a dummy(test) account, I was able to replicate the exact issue. I IMAP'd all the emails into Thunderbird and found that there were 21000+ emails in the account.

16000+emails alone were Mail Delivery Failure emails. I deleted all those from inbox, purge the trash folder a few times, logged in & out of webmail a few times for the server to sync, and viola I was able to access the inbox folder with no issues again.
 
Possibly then an issue with Nutsmail; perhaps not able to handle folders with so many emails in them. Only a guess.

Jeff
 
Jeff,

Whether or not to call it a bug, you firstly need to read its requirements. How much RAM do the developers recommend to use for their script? I don't know.
 
I didn't call it a bug :D. But you're right of course.

To confound the issue, a search for nutsmail just confuses me. Does it have a homepage?

Jeff
 
Back
Top