[URGENT] Bench start Issue

I tried to install two bench in the same server one for production(already running) and another for develop everything gone good once I tried bench start then it starts weird below traceback keeps on looping automatically servers get shuts after few minutes

traceback
10:38:00 web.1 | 192.168.x.xx - - [10/May/2017 10:38:00] “GET /api/method/frappe.async.get_user_info?sid=312feff1e52094b594175882695b45f2a32665bf700fe0a1effb222c HTTP/1.1” 200 -

Error Report

Python 2.7.6: /home/vhrs/frappe-bench/env/bin/python (prefix: /home/vhrs/frappe-bench/env)

Timestamp:
2017-05-09 19:58:50.795425
Relapsed
592
Exception

args (1040, ‘Too many connections’)
message ‘’
Locals

CLIENT
FIELD_TYPE
args ()
autocommit False
charset u’utf8mb4’
client_flag 196608
client_version (10, 0)
conv {0: , 1: , 2: , 3: , 4: , 5: , 7: , 8: , 9: , 10: , …}
conv2 {0: , 1: , 2: , 3: , 4: , 5: , 7: , 8: , 9: , 10: , …}
conversions {0: , 1: , 2: , 3: , 4: , 5: , 7: , 8: , 9: , 10: , …}
cursorclass
k 254
kwargs {‘charset’: u’utf8mb4’, ‘host’: u’localhost’, ‘passwd’: u’sMZTKtXj5RQK75nG’, ‘use_unicode’: True, ‘user’: u’1bd3e0294d’}
kwargs2 {‘client_flag’: 196608, ‘conv’: {0: , 1: , 2: , 3: , 4: , 5: , 7: , 8: , 9: , 10: , …}, ‘host’: u’localhost’, ‘passwd’: u’sMZTKtXj5RQK75nG’, ‘user’: u’1bd3e0294d’}
n ‘0’
proxy
self <_mysql.connection closed at 2a858c0>
sql_mode ‘’
use_unicode True
v [(128, )]
Traceback

/home/vhrs/frappe-bench/apps/frappe/frappe/app.py: 52

50 rollback = True
51
52 init_request(request)
53
54 if frappe.local.form_dict.cmd:
Locals
/home/vhrs/frappe-bench/apps/frappe/frappe/app.py: 114

112 make_form_dict(request)
113
114 frappe.local.http_request = frappe.auth.HTTPRequest()
115
116 def make_form_dict(request):
Locals
/home/vhrs/frappe-bench/apps/frappe/frappe/auth.py: 48

46
47 # login
48 frappe.local.login_manager = LoginManager()
49
50 if frappe.form_dict._lang:
Locals
/home/vhrs/frappe-bench/apps/frappe/frappe/auth.py: 110

108 self.resume = True
109 self.make_session(resume=True)
110 self.set_user_info(resume=True)
111 except AttributeError:
112 self.user = “Guest”
Locals
/home/vhrs/frappe-bench/apps/frappe/frappe/auth.py: 134

132
133 self.info = frappe.db.get_value(“User”, self.user,
134 [“user_type”, “first_name”, “last_name”, “user_image”], as_dict=1)
135 self.full_name = " ".join(filter(None, [self.info.first_name,
136 self.info.last_name]))
Locals
/home/vhrs/frappe-bench/apps/frappe/frappe/database.py: 413

411
412 ret = self.get_values(doctype, filters, fieldname, ignore, as_dict, debug,
413 order_by, cache=cache)
414
415 return ((len(ret[0]) > 1 or as_dict) and ret[0] or ret[0][0]) if ret else None
Locals
/home/vhrs/frappe-bench/apps/frappe/frappe/database.py: 457

455 if (filters is not None) and (filters!=doctype or doctype==“DocType”):
456 try:
457 out = self._get_values_from_table(fields, filters, doctype, as_dict, debug, order_by, update)
458 except Exception, e:
459 if ignore and e.args[0] in (1146, 1054):
Locals
/home/vhrs/frappe-bench/apps/frappe/frappe/database.py: 588

586
587 r = self.sql(“select {0} from tab{1} where {2} {3}”.format(fl, doctype,
588 conditions, order_by), values, as_dict=as_dict, debug=debug, update=update)
589
590 return r
Locals
/home/vhrs/frappe-bench/apps/frappe/frappe/database.py: 107

105 “”"
106 if not self._conn:
107 self.connect()
108
109 # in transaction validations
Locals
/home/vhrs/frappe-bench/apps/frappe/frappe/database.py: 53

51 warnings.filterwarnings(‘ignore’, category=MySQLdb.Warning)
52 self._conn = MySQLdb.connect(user=self.user, host=self.host, passwd=self.password,
53 use_unicode=True, charset=‘utf8mb4’)
54 self._conn.converter[246]=float
55 self._conn.converter[12]=get_datetime
Locals
/home/vhrs/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/init.py: 81

79 “”“Factory function for connections.Connection.”“”
80 from MySQLdb.connections import Connection
81 return Connection(*args, **kwargs)
82
83 connect = Connection = Connect
Locals
/home/vhrs/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py: 193

191 autocommit = kwargs2.pop(‘autocommit’, False)
192
193 super(Connection, self).init(*args, **kwargs2)
194 self.cursorclass = cursorclass
195 self.encoders = dict([ (k, v) for k, v in conv.items()
Locals

searching for the error resulted into,

Separate sites on separate benches have separate databases? Are these databases configured correctly in site_config.jsons?

You can try bench server --port 9090 command

10:38:00 web.1 | 192.168.x.xx - - [10/May/2017 10:38:00] "GET /api/method/frappe.async.get_user_info?sid=312feff1e52094b594175882695b45f2a32665bf700fe0a1effb222c HTTP/1.1" 200 -

above lines are looping in production I dont know I deleted the second bench also

This is fixed now. There was a new version of socketio that was causing the problem.

thanks @rmehta do I need to update

@hereabdulla yes!