https://issues.rhodecode.com/https://issues.rhodecode.com/favicon.ico?16960560042017-04-05T10:37:53ZRhodeCode - issuesRhodeCode CE/EE - Support #5269: Upgrade from RC EE 3.7.1 to RC EE 4.xhttps://issues.rhodecode.com/issues/5269?journal_id=248162017-04-05T10:37:53ZMarcin Kuzminski [CTO]marcin@rhodecode.com
<ul></ul><p>Hi,</p>
<p>Please check if defualt_encoding is set to proper value inside rhodecode.ini, if you don't use UTF8</p>
<p>as for slow push/pull, maybe you need to increase the number of workers=N inside rhodecode.ini/vcsserver.ini ? We didn't have any reports on performance decrese after 3.X -> 4.X migration.</p>
RhodeCode CE/EE - Support #5269: Upgrade from RC EE 3.7.1 to RC EE 4.xhttps://issues.rhodecode.com/issues/5269?journal_id=248672017-04-24T00:14:43ZAnton Nikolaev
<ul><li><strong>File</strong> <a href="/attachments/2749">before_after.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2749/before_after.png">before_after.png</a> added</li></ul><p>Information about versions for testing</p>
<pre><code>[user@rhodecode ~]$ rccontrol status
- NAME: enterprise-2
- STATUS: RUNNING
- TYPE: Enterprise
- VERSION: 3.7.1
- URL: http://192.168.122.51:8080
- NAME: vcsserver-1
- STATUS: RUNNING
- TYPE: VCSServer
- VERSION: 3.7.1
- URL: http://127.0.0.1:10001
[user@rhodecode ~]$ rccontrol status
RHODECODE CONTROL VERSION: 1.13.1
- NAME: enterprise-2
- STATUS: RUNNING
logs:/home/user/.rccontrol/enterprise-2/enterprise.log
- VERSION: 4.2.1 Enterprise
- VCS: vcsserver-1
- URL: http://192.168.122.118:8080
- CONFIG: /home/user/.rccontrol/enterprise-2/rhodecode.ini
- NAME: vcsserver-1
- STATUS: RUNNING
logs:/home/user/.rccontrol/vcsserver-1/vcsserver.log
- VERSION: 4.2.1 VCSServer
- URL: http://127.0.0.1:10001
- CONFIG: /home/user/.rccontrol/vcsserver-1/vcsserver.ini
</code></pre>
<hr>
<blockquote>
<p>Marcin Kuzminski<br>
Please check if defualt_encoding is set to proper value inside rhodecode.ini, if you don't use UTF8</p>
</blockquote>
<p>The same values for default_encoding</p>
<p>RC Enterprise 3.7.1</p>
<pre><code>[user@rhodecode ~]$ cat .rccontrol/enterprise-2/rhodecode.ini | grep default_encoding
default_encoding = utf8,cp866
</code></pre>
<p>RC Enterprise 4.2.1</p>
<pre><code>[user@rhodecode ~]$ cat .rccontrol/enterprise-2/rhodecode.ini | grep default_encoding
default_encoding = utf8,cp866
</code></pre>
<p>But</p>
<p><img src="https://issues.rhodecode.com/attachments/download/2749/before_after.png" alt="" loading="lazy" /></p>
<p>Red is hidden information</p>
<p>Interface localization to russian - OK<br>
Latin characters - OK<br>
Russian characters in files - OK<br>
Russian characters in commit messages, users first name and second name, groups descriptions and etc was <strong>broken</strong>. Examples in the green rectangle on screenshot.</p>
<p>My solution for every column in DB which contain informations (commit messages, groups descriptions and etc)</p>
<pre><code>ALTER TABLE tablename MODIFY column TEXT CHARSET latin1;
ALTER TABLE tablename MODIFY column BLOB;
ALTER TABLE tablename MODIFY column TEXT CHARSET utf8;
</code></pre>
<p>In RC DB it's</p>
<table><thead>
<tr>
<th>Table</th>
<th>Columns</th>
</tr>
</thead><tbody>
<tr>
<td>changeset_comments</td>
<td>text</td>
</tr>
<tr>
<td>groups</td>
<td>group_description</td>
</tr>
<tr>
<td>users</td>
<td>firstname,lastname</td>
</tr>
<tr>
<td>etc</td>
<td>etc</td>
</tr>
</tbody></table>
<p>Your scripts changing DB encoding from latin1 to utf8 during update from 3.x to 4.x. Why is this necessary?</p>
<p>I think that doing it manually is bad. </p>
<p>I propose two solutions for the next RC version<br>
1) Don't change DB encoding during update<br>
2) Do the same as I indicated, but in automatic mode.</p>
<hr>
<blockquote>
<p>Marcin Kuzminski<br>
as for slow push/pull, maybe you need to increase the number of workers=N inside rhodecode.ini/vcsserver.ini ? </p>
</blockquote>
<p>The same values for parameter "workers" in both versions.</p>
<p>RC Enterprise 3.7.1</p>
<pre><code>[user@rhodecode ~]$ cat .rccontrol/vcsserver-1/vcsserver.ini | grep workers
# where N is number of RhodeCode Enterprise workers, eg. running 2 instances
# 8 gunicorn workers each would be 2 * 8 * 6 = 96, threadpool_size = 96
[user@rhodecode ~]$ cat .rccontrol/enterprise-2/rhodecode.ini | grep workers
workers = 3
## Sets the number of process workers. You must set `instance_id = *` when this option
#workers = 1
</code></pre>
<p>RC Enterprise 4.2.1</p>
<pre><code>[user@rhodecode ~]$ cat .rccontrol/vcsserver-1/vcsserver.ini | grep workers
# where N is number of RhodeCode Enterprise workers, eg. running 2 instances
# 8 gunicorn workers each would be 2 * 8 * 6 = 96, threadpool_size = 96
[user@rhodecode ~]$ cat .rccontrol/enterprise-2/rhodecode.ini | grep workers
workers = 3
## Sets the number of process workers. You must set `instance_id = *` when this option
#workers = 1
</code></pre>
<p>I can't talk about real repositories, so I tested it with this repo - <a href="http://hg.hedgewars.org/hedgewars/" class="external">http://hg.hedgewars.org/hedgewars/</a>,<br>
I have had problems with the push / pull that I described earlier.</p>
<p>What information can I still provide to solve this problem? Metrics, parameters and etc.</p>
<hr>
<blockquote>
<p>Marcin Kuzminski<br>
We didn't have any reports on performance decrese after 3.X -> 4.X migration.</p>
</blockquote>
<p>So I'll be the first who will report about it :)</p>
RhodeCode CE/EE - Support #5269: Upgrade from RC EE 3.7.1 to RC EE 4.xhttps://issues.rhodecode.com/issues/5269?journal_id=248682017-04-24T10:13:45ZMarcin Kuzminski [CTO]marcin@rhodecode.com
<ul></ul><p>Hi,</p>
<p>Thanks for your feedback. As fordatabase encoding, we wasn't aware of this problem sorry, I believe it;s out migration scripts that could be doing this, but it wasn't intended. Can i ask if only new tables were created in utf8 or everything was changed to utf8 ?<br>
because we generally recommend using utf8 for everything, and our new tables are created in such mode by default.</p>
<p>Can you show the problem with push with <code>hg --debug push</code> ? also provide your HTTP server(Nginx/Apache) logs if it sits in front of RhodeCode server.</p>
RhodeCode CE/EE - Support #5269: Upgrade from RC EE 3.7.1 to RC EE 4.xhttps://issues.rhodecode.com/issues/5269?journal_id=249912017-06-18T20:07:50ZAnton Nikolaev
<ul><li><strong>File</strong> <a href="/attachments/2814">rh1.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2814/rh1.png">rh1.png</a> added</li></ul><p>Marcin Kuzminski [staff] wrote:</p>
<blockquote>
<p>Hi,</p>
<p>Thanks for your feedback. As fordatabase encoding, we wasn't aware of this problem sorry, I believe it;s out migration scripts that could be doing this, but it wasn't intended. Can i ask if only new tables were created in utf8 or everything was changed to utf8 ?<br>
because we generally recommend using utf8 for everything, and our new tables are created in such mode by default.</p>
</blockquote>
<p>Our company use RC from version 1.x with MySQL. Default encoding in MySQL latin1. <br>
Which solutions can you recommend for me?</p>
<blockquote>
<p>Can you show the problem with push with <code>hg --debug push</code> ? also provide your HTTP server(Nginx/Apache) logs if it sits in front of RhodeCode server.</p>
</blockquote>
<p>I did a lot of experiments with different OS. With HTTP servers and without it.</p>
<p><strong>The result of one experiment</strong></p>
<p>OS: </p>
<pre><code>user@u16rh4:~$ uname -a
Linux u16rh4 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
</code></pre>
<p>Install clean RC in clean OS</p>
<pre><code>user@u16rh4:~$ rccontrol status
RHODECODE CONTROL VERSION: 1.14.0
- NAME: community-1
- STATUS: RUNNING
logs:/home/user/.rccontrol/community-1/community.log
- VERSION: 4.7.2 Community
- VCS: vcsserver-1
- URL: http://192.168.122.95:10002
- CONFIG: /home/user/.rccontrol/community-1/rhodecode.ini
- NAME: vcsserver-1
- STATUS: RUNNING
logs:/home/user/.rccontrol/vcsserver-1/vcsserver.log
- VERSION: 4.7.2 VCSServer
- URL: http://127.0.0.1:10001
- CONFIG: /home/user/.rccontrol/vcsserver-1/vcsserver.ini
</code></pre>
<p><strong>Without</strong> HTTP server</p>
<p>I'm create repo</p>
<p><img src="https://issues.rhodecode.com/attachments/download/2814/rh1.png" alt="" loading="lazy" /></p>
<p>Clone Hedgewars from official site to non-RC pc</p>
<pre><code>$ hg clone http://hg.hedgewars.org/hedgewars/
</code></pre>
<p>And push it to RC by command from screen with debug</p>
<pre><code>$ hg --version
Mercurial Distributed SCM (version 2.8.2)
(see http://mercurial.selenic.com for more information)
Copyright (C) 2005-2013 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ hg push http://admin@192.168.122.95:10002/hedgewars --debug
</code></pre>
<p>Part of log</p>
<pre><code>$ hg push http://admin@192.168.122.95:10002/hedgewars --debug
pushing to http://admin@192.168.122.95:10002/hedgewars
using http://192.168.122.95:10002/hedgewars
http auth: user admin, password not set
sending capabilities command
query 1; heads
sending batch command
searching for changes
taking quick initial sample
searching: 2 queries
query 2; still undecided: 12404, sample size is: 100
sending known command
sampling from both directions
searching: 3 queries
query 3; still undecided: 1723, sample size is: 200
sending known command
3 total queries
12432 changesets found
list of changesets:
475c0f2f9d17f770440c1ec533a9c48390523ad8
30f2d1037d5da65660b237d1bd2e37ea6b39f7c8
4eeab397c3c6f9e71873a82a61ab77baa2a92655
. . .
sending unbundle command
sending 643033094 bytes
sending: 64/1255924 kb (0.01%)
sending: 128/1255924 kb (0.01%)
sending: 192/1255924 kb (0.02%)
sending: 256/1255924 kb (0.02%)
sending: 320/1255924 kb (0.03%)
sending: 384/1255924 kb (0.03%)
sending: 448/1255924 kb (0.04%)
sending: 512/1255924 kb (0.04%)
sending: 576/1255924 kb (0.05%)
sending: 640/1255924 kb (0.05%)
sending: 704/1255924 kb (0.06%)
abort: error: Connection reset by peer
$
</code></pre>
<p>Full log in bash_log.txt</p>
<p>RC without ERROR</p>
<pre><code>user@u16rh4:~/.rccontrol$ pwd
/home/user/.rccontrol
user@u16rh4:~/.rccontrol$ grep -r "INFO" . | wc -l
203
user@u16rh4:~/.rccontrol$ grep -r "ERROR" . | wc -l
0
</code></pre> RhodeCode CE/EE - Support #5269: Upgrade from RC EE 3.7.1 to RC EE 4.xhttps://issues.rhodecode.com/issues/5269?journal_id=250112017-06-19T23:38:42ZMarcin Kuzminski [CTO]marcin@rhodecode.com
<ul></ul><p>Hi Anton,</p>
<p>Little bit confused here, is the problem still encoding issues, or is it now a push issue ?</p>
<p>Please take a look at /home/user/.rccontrol/vcsserver-1/vcsserver.log for any Exceptions ?</p>
RhodeCode CE/EE - Support #5269: Upgrade from RC EE 3.7.1 to RC EE 4.xhttps://issues.rhodecode.com/issues/5269?journal_id=250282017-06-20T17:03:15ZAnton Nikolaev
<ul><li><strong>File</strong> <a href="/attachments/2817">vcsserver.log</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2817/vcsserver.log">vcsserver.log</a> added</li></ul><p>Marcin Kuzminski [staff] wrote:</p>
<blockquote>
<p>Hi Anton,</p>
<p>Little bit confused here, is the problem still encoding issues, or is it now a push issue ?</p>
</blockquote>
<p>In issue's description I wrote</p>
<pre><code>After that I have two problems
</code></pre>
<blockquote>
<p>Please take a look at /home/user/.rccontrol/vcsserver-1/vcsserver.log for any Exceptions ?</p>
</blockquote>
<p>Add full log - vcsserver.log</p>
RhodeCode CE/EE - Support #5269: Upgrade from RC EE 3.7.1 to RC EE 4.xhttps://issues.rhodecode.com/issues/5269?journal_id=250662017-06-29T19:21:54ZAnton Nikolaev
<ul></ul><p>Do you have any new information?</p>
RhodeCode CE/EE - Support #5269: Upgrade from RC EE 3.7.1 to RC EE 4.xhttps://issues.rhodecode.com/issues/5269?journal_id=250672017-06-29T19:36:23ZMarcin Kuzminski [CTO]marcin@rhodecode.com
<ul></ul><p>Hi Anton,</p>
<p>No sorry we couldn't figure out anything relevant from the logs. I quick question would it be possible to have somehow a remote session so we can check your instance ourself ? This looks like something obvious to fix, but we're missing it. Maybe a remote sesison would be productive and we could find a cool print for your troubles.</p>