##// END OF EJS Templates
git: use force fetch and update for target ref. This solves a case...
git: use force fetch and update for target ref. This solves a case when in PRs a target is force updated and is out of sync. Before we used a pull which --ff-only fails obviosly because two are out of sync. This change uses new logic that resets the target branch according to the source target branch allowing smooth merge simulation.

File last commit:

r1292:771d79b4 default
r2784:e8c62649 default
Show More
tuning-user-sessions-performance.rst
59 lines | 2.0 KiB | text/x-rst | RstLexer
/ docs / admin / tuning-user-sessions-performance.rst

Increase User Session Performance

The default file-based sessions are only suitable for smaller setups, or instances that doesn't have a lot of users or traffic. They are set as default option because it's setup-free solution.

The most common issue of file based sessions are file limit errors which occur if there are lots of session files.

Therefore, in a large scale deployment, to give better performance, scalability, and maintainability we recommend switching from file-based sessions to database-based user sessions or memcached sessions.

To switch to database-based user sessions uncomment the following section in your :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file.

## db based session, fast, and allows easy management over logged in users
beaker.session.type = ext:database
beaker.session.table_name = db_session

# use just one of the following accoring to the type of database
beaker.session.sa.url = postgresql://postgres:secret@localhost/rhodecode
beaker.session.sa.url = mysql://root:secret@127.0.0.1/rhodecode

beaker.session.sa.pool_recycle = 3600
beaker.session.sa.echo = false

and make sure you comment out the file based sessions.

## types are file, ext:memcached, ext:database, and memory (default).
#beaker.session.type = file
#beaker.session.data_dir = %(here)s/data/sessions/data

To switch to memcached-based user sessions uncomment the following section in your :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini` file.

## memcached sessions
beaker.session.type = ext:memcached
beaker.session.url = localhost:11211

and make sure you comment out the file based sessions.

## types are file, ext:memcached, ext:database, and memory (default).
#beaker.session.type = file
#beaker.session.data_dir = %(here)s/data/sessions/data