what might be happening is that that alot of things might be bugged or something is causeing issues so maybe a clean world might fix it?
Lets just clear all this up, Java requires RAM to do its individual and bulk processes, Java is a requirement for Minecraft to run, the only thing RAM does for loading modpacks etc is letting them load easily or load at all. Servers time out because RAM needs to be savoured ever so slightly or that your connection might have dropped for a split second or otherwise.
Thanks. I added a debug message. Please let me know when it happens again so I can check the logs again.