Multitenancy via port: sites count allowed

Hi All

I was just expermenting with erpnext multitenancy (port based setup) and found a very curious thing:

After 3 sites ( 1 running on port 80, another on 8082 and third on 8085), i was not able to add any new site

I was always stuck on bench set-nginx-port <> and always got the following error:

Error:
sudo bench set-nginx-port erp8090 8900
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==4.0.0’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/commands/utils.py”, line 27, in set_nginx_port
set_nginx_port(site, port)
File “/home/frappe/bench-repo/bench/config/site_config.py”, line 24, in set_nginx_port
set_site_config_nginx_property(site, {“nginx_port”: port}, bench_path=bench_path, gen_config=gen_config)
File “/home/frappe/bench-repo/bench/config/site_config.py”, line 37, in set_site_config_nginx_property
make_nginx_conf(bench_path=bench_path)
File “/home/frappe/bench-repo/bench/config/nginx.py”, line 13, in make_nginx_conf
sites = prepare_sites(config, bench_path)
File “/home/frappe/bench-repo/bench/config/nginx.py”, line 77, in prepare_sites
raise Exception(“Port {0} is being used by another site {1}”.format(site[“port”], ports_in_use[site[“port”]]))
Exception: Port 80 is being used by another site site2

root@uds-14-04-1-ssh:~# sudo bench version
erpnext 7.0.5
frappe 7.0.7

root@uds-14-04-1-ssh:~# uname -a
Linux uds-14-04-1-ssh 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

root@uds-14-04-1-ssh:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty
root@uds-14-04-1-ssh:~#

I could get over this error by first removing all other sites except the 1 running on port 80

and then everything worked like a charm.

so is there some restriction on erpnext for multitenancy?