Opera Mail "Contacting server" issue when using more than 2 gmail accounts

No idea if this issue is only mine, but I had this issue in the past. With 2 accounts, there are no issues. With 3 accounts, mail downloading becomes very, very unstable and sometimes it takes a minute or two to read the smallest email. IF it happens. Sometimes the account disconnects and have to input the email password again (rarely).
I'm using Gmail with IMAP.

I don't use Opera Mail, but with many other eMail programs, there is a timer adjustment in the programs for incoming eMail that sets how long the program will wait without a specific server handshake/response. If your software/network/servers are heavily loaded or multi-tasking with the 3 accounts, it's possible that the timer is running out before the mail read operation can complete. If you can, try extending that timer value... on my systems (with Outlook, Outlook Express, and PocoMail), I have to set them to 2 minutes timeout instead of their default 30 seconds to avoid the sort of thing you describe.

On the "Incoming" tab in the account's properties, make sure "check for new messages every..." is checked and make sure the check interval is between 9 and 31. If you check too often, Gmail will disconnect Opera and Opera won't recover right unless you restart Opera or switch to work offline and then back. If you don't check often enough, the IDLE connections will time out and you won't get new messages until the next check interval except maybe when you click (select) an IMAP folder. You should make sure "including this account when checking manually" is checked also.

Also make sure you don't have too many clients connecting to your Gmail account at once. Webmail + cell + Opera all at the same time can cause the server to disconnect Opera (for example) and cause connection issues.

Opera itself uses 2 connections by default for Gmail IMAP. You can close down Opera and edit incomingN.txt in the "mail" folder (where N is the number for the account as seen in accounts.ini) to set Force Single Connection=1. It might not help though.

If 2 of the three accounts are just accounts added into Opera to kind of support aliases for the main account, since it's the same account, the Gmail IMAP server might not like that many connections. Opera doesn't really support aliases anyway. So, delete those 2 accounts.

Test in Thunderbird with those accounts to make sure things work right in it.

For Opera, download the installer, launch it, click "options", set "install path" to a folder on your desktop, set "install for" to "Standalone Installation (USB)" and install. In that Opera, set up your IMAP accounts and test how things work there. If they work fine, maybe the mail folder in your normal install is messed up.

Also, make sure you're not using low-bandwidth mode or "do not download attachments". And, if you can, make sure to set "make all messages available offline" on the "incoming" tab in the account's properties. That way, Opera will only ever have to fetch bodies for new messages after that, but even then, it'll do that right away.

Also, restart Opera every few hours when using Gmail IMAP.

Also, if you're not subscribed to the "[Gmail]/All Mail" IMAP folder for each account, try subscribing to it and testing for a while to see if it makes a difference (it shouldn't, but try).

Sometimes the account disconnects and have to input the email password again (rarely).

That's normal. Gmail IMAP just does that sometimes. It even does it in Thunderbird (although it seems to happen more in Opera).

Besides those things, it could be something besides Opera like a firewall, anti-virus (email scanner for example) or anti-malware (web shields can sometimes affect mail clients).

Also with Gmail IMAP specifically, don't shift + del (to move messages to [Gmail]/Trash" and then wipe them out all in one shot) with a huge selection of messages as it can cause Opera to get confused where it'll get stuck contacting the server or checking the folder etc. Instead, always, del to move to [Gmail]/Trash and then empty the trash from there. In general though, don't do anything (like dragging from one IMAP folder to another) with a huge selection of messages.

You can check the database. You can defrag your hard drive (while Opera Mail is closed). Or, while Opera is closed, you can copy your mail folder somewhere else, delete the original and put the copy where the original was. You could run chkdsk /r in Windows to try and fix any drive issues.