Read error looking for ack: EOF

I am new to ELK stack. My configuration contains logstash-forwarder pushing my server logs to logstash residing in a seperate instance. But recently i found two issues.

  1. Logstash-forwarder is able to connect to logstash server but imediately throwing the error

Setting trusted CA from file: /path/to//logstash-forwarder.crt
2015/08/05 10:18:39.416031 Connecting to [x.x.x.x]:8140
2015/08/05 10:18:39.467751 Connected to x.x.x.x
2015/08/05 10:18:39.543006 Read error looking for ack: EOF

and the same log is repeated again and again

  1. My logstash server seems to be starting fine if i start it as a service but after sometime it stops abruptly. In Logstash.err log i see the following

Error: Your application used more memory than the safety cap of 500M.
Specify -J-Xmx####m to increase it (#### = cap size in MB).
Specify -w for full OutOfMemoryError stack trace

But i dont think my application is taking that much memory. Moreover the same configuration is working in other instances.
versions i am using are: 0.4.0 for logstash-forwarder and 1.4.2 for logstash.

please suggest any fix for this as i could find anything on the internet.

Thanks in advance.

What versions of everything are you using? OS?

What is different between the instance you are using here and the other ones that work?

I am using EC2 instances for this. OS is Amazon linux with AMI ID: ami-c57c05b2. And regarding the second question there is no difference between the working ones and this one. That is what confuses me the most.

I'd upgrade to 1.5.3 for LS for starters.

How much RAM do these instances have?

Ram is 2GB out of which around 1GB is free