Gateway timeout Error while Load Testing: User Login-->Select Team--> Performs direct chat-->Logout

We have performed load testing using JMeter for 100 users. For the first few requests everything works fine but after sometime Gateway timeout error is encountered.Please refer to screenshot:

In the beginning, same APIs run successfully but later the very same APIs return this error (504 Gateway Timeout Error).

We have configured mattermost with AWS server .
AWS server details:
Web Server Instance
Instance Size: C3 2X large
RDS Server Instance

Hi Ajita,

Hard to tell what your problem is without some logs from the Mattermost server. Also are you using a machine running Nginx as we suggest or are you using another proxy like ELB?

For our next release (3.5 November 16) we are doing a big push on performance. If your considering using Mattermost at a scale above 10000 users I would evaluate our current master build. You can find that here:

We are currently working on a document to help people setup Mattermost at large scale. Some suggestions from that document:

Modify your /etc/init/mattermost.conf to be:

start on runlevel [2345]
stop on runlevel [016]
limit nofile 50000 50000
chdir /home/ubuntu/mattermost
setuid ubuntu
exec bin/platform

Modify your ulimits on your proxy and Mattermost machines. (by editing /etc/security/limits.conf)

ulimit -n 65536 65536
ulimit -u 8192 8192