Show Server Host name in Debugger Output

4 views
Skip to first unread message

Dmitry A.

unread,
Jul 9, 2012, 1:53:52 PM7/9/12
to in-por...@googlegroups.com
Hi guys,


It seems to be useful to show Server "Host Name" in Debugger Output along with other SQL info when SQL Profiling is enabled. Especially when using DB Balancing.

Currently it only used to show Server ID/index (ie. Server #1), plus never showed it for Master Server (used for Writes).


Task (for 5.2.0) + Patch below:

1345: Show Server Host name in Debugger Output -  http://tracker.in-portal.org/view.php?id=1345 


DA
ShowServerHostName-in-Debugger.patch

Alexander Obuhovich

unread,
Jul 9, 2012, 2:11:35 PM7/9/12
to in-por...@googlegroups.com
This might be useful when load balancing is used to easily see what db server is used, but in real life 99.9% of In-Portal installation don't use load balancing due low RPS (requests per second) on website.

Maybe adding "Server #0 (aaa.bbb.ccc.ddd)" to each SQL being displayed in debugger (same info in each line) is just too much.

Dmitry A.

unread,
Jul 9, 2012, 2:18:45 PM7/9/12
to in-por...@googlegroups.com
To be honest, I think it's okay to see this so you don't have to guess it at all.

It's not like we have so much info in there. I my opinion it's better to show this so it's handy since it's not necessarily is LOCALHOST as hostname. I see this quote often when there is IP address too even with single server.

In other words, I look in that DB info string only when needed and it doesn't really bother me with what we have there now so Hostname is okay for me...


DA 

Alexander Obuhovich

unread,
Jul 9, 2012, 2:20:59 PM7/9/12
to in-por...@googlegroups.com
I'm not against showing extra info, when that info differs. But in this case it's all the same info in each line.

This way if you have 1 server all the time, why write it's number or IP if it's only one server and you know all details from config.php

Dmitry A.

unread,
Jul 9, 2012, 2:26:47 PM7/9/12
to in-por...@googlegroups.com
Very simple example - I am troubleshooting and have 2 copies of the website open (with DBG on) side by side:

1. UAT or SANDBOX
2. LIVE

When reviewing and comparing them I don't want to remember which Server IP / Hostname this particular website is working this - I want to see it right away to save time and human error.

At least this is how I think - may be I am lazy, but why should I remember this info when it can be right next to SQL when needed?! :)


DA 

Alexander Obuhovich

unread,
Jul 9, 2012, 2:29:02 PM7/9/12
to in-por...@googlegroups.com
Interesting way to copy/paste server ip in each sql of debugger report to distinguish 2 websites instead of distinguishing them by url.

Dmitry A.

unread,
Jul 9, 2012, 2:32:18 PM7/9/12
to in-por...@googlegroups.com

Yes, as you can see they are very close indeed:


I like the approach  - Don't Make Me Think - where it's not needed of course ;)


DA

Phil

unread,
Jul 9, 2012, 2:32:34 PM7/9/12
to in-por...@googlegroups.com
Hi guys,

I think it's always more human friendly to see server name, and not IP. Should it be possible to have this feature enabled only when system use 2 DB, or when explicitly enabled in debug.php? Thus you'll all be happy to use the way you want :)

p


Envoyé avec Sparrow

Alexander Obuhovich

unread,
Jul 9, 2012, 2:34:38 PM7/9/12
to in-por...@googlegroups.com
Phil has a point, as with feature with mod-rewrite urls cache. New option in debug.php will satisfy both parties (who want extra info and ones who don't want, like me).

Dmitry A.

unread,
Jul 9, 2012, 2:35:59 PM7/9/12
to in-por...@googlegroups.com
Fine!

Let's show Server Index + Hostname/IP ONLY when there are 2+ servers specified in DB configuration (ie. Load balancing setup)

Alex, are you agree with this?

DA

Alexander Obuhovich

unread,
Jul 9, 2012, 2:38:14 PM7/9/12
to in-por...@googlegroups.com
But this doesn't cover your the case when you need to compare 2 websites side-by-side where load balancing isn't enabled.

Having a manual setting is better in this case.

Dmitry A.

unread,
Jul 9, 2012, 2:46:41 PM7/9/12
to in-por...@googlegroups.com
Okay, new DBG setting it is then!

Please update the task + patch according!


DA

Phil

unread,
Jul 9, 2012, 3:58:54 PM7/9/12
to in-por...@googlegroups.com
I personally find that our debug.php is really very powerful, seeing the latest improvements. Serious software need a serious debugger, and we have both :)


Envoyé avec Sparrow

Alexander Obuhovich

unread,
Jul 12, 2012, 11:49:27 AM7/12/12
to in-por...@googlegroups.com
Here is the updated version of the patch.
db_server_info_in_debugger_report.patch
Reply all
Reply to author
Forward
0 new messages