Mythweb waits 12 seconds after establishing a new socket

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
jlatz
Newcomer
Posts: 2
Joined: Thu Aug 09, 2018 4:48 am
United States of America

Mythweb waits 12 seconds after establishing a new socket

Post by jlatz » Thu Aug 09, 2018 4:53 am

I am hoping someone can help me out, because I'm out of ideas.

If I'm trying to use Mythweb as a remote control, it's about 30 seconds before I see a response from an arrow click. All I can tell from the frontend.log is that the system seems to consistently take 12 seconds to make up its mind after initiating a new connection:

Code: Select all

Aug  8 21:40:27 Mythbox mythfrontend.real: mythfrontend[1631]: I CoreContext networkcontrol.cpp:372 (newConnection) NetworkControl: New connection established.
Aug  8 21:40:39 Mythbox mythfrontend.real: mythfrontend[1631]: I CoreContext networkcontrol.cpp:337 (deleteClient) NetworkControl: Client Socket disconnected
Aug  8 21:40:40 Mythbox mythfrontend.real: mythfrontend[1631]: I CoreContext networkcontrol.cpp:372 (newConnection) NetworkControl: New connection established.
Aug  8 21:40:52 Mythbox mythfrontend.real: mythfrontend[1631]: I HttpServer35 mythfexml.cpp:144 (GetScreenShot) Screen shot requested (960x0), format jpg
Aug  8 21:40:52 Mythbox mythfrontend.real: mythfrontend[1631]: I CoreContext mythmainwindow.cpp:959 (SaveScreenShot) Saving screenshot to //var/lib/mythtv/tvscreenshots/myth-screenshot-XML.jpg (960x557)
Aug  8 21:40:52 Mythbox mythfrontend.real: mythfrontend[1631]: I CoreContext mythmainwindow.cpp:963 (SaveScreenShot) MythMainWindow::screenShot succeeded
Aug  8 21:40:52 Mythbox mythfrontend.real: mythfrontend[1631]: I CoreContext networkcontrol.cpp:337 (deleteClient) NetworkControl: Client Socket disconnected

jlatz
Newcomer
Posts: 2
Joined: Thu Aug 09, 2018 4:48 am
United States of America

Re: Mythweb waits 12 seconds after establishing a new socket

Post by jlatz » Fri Aug 10, 2018 2:28 pm

Should have included this:

MythTV Version : v29.1-31-g563a4b8
MythTV Branch : fixes/29
Network Protocol : 91
Library API : 29.20180316-1
QT Version : 5.5.1
Options compiled in:
linux profile use_hidesyms using_alsa using_oss using_pulse using_pulseoutput using_backend using_bindings_perl using_bindings_python using_bindings_php using_crystalhd using_dvb using_firewire using_frontend using_hdhomerun using_vbox using_ceton using_hdpvr using_ivtv using_joystick_menu using_libcec using_libcrypto using_libdns_sd using_libfftw3 using_libxml2 using_lirc using_mheg using_opengl using_opengl_video using_opengl_themepainter using_qtwebkit using_qtscript using_qtdbus using_taglib using_v4l2 using_x11 using_xrandr using_xv using_profiletype using_systemd_notify using_systemd_journal using_bindings_perl using_bindings_python using_bindings_php using_freetype2 using_mythtranscode using_opengl using_vaapi using_vdpau using_ffmpeg_threads using_mheg using_libass using_libxml2 using_libmp3lame

User avatar
pgbennett
Developer
Posts: 241
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Mythweb waits 12 seconds after establishing a new socket

Post by pgbennett » Sun Aug 12, 2018 2:49 pm

I assume you refer to http://servername/mythweb/remote
I tried this, and it is instantaneous for me.
Perhaps you have a slow network. It seems to send screenshots every time, and this may be causing slowdowns if your network is slow.
It is rather a clunky interface. I do not think it can be usefully used as a remote control, expect perhaps for testing or unusual situations.
What are you trying to do? There may be a better solution.

User avatar
bill6502
Developer
Posts: 1051
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Mythweb waits 12 seconds after establishing a new socket

Post by bill6502 » Mon Aug 13, 2018 12:43 am

Don't use it myself, but I do see the delay issue (Ubuntu 16.04/MythTV 30-Pre)

Peter and @ jlatz, would you look in /var/log/apache2/error.log and see if you've got lines similar to the below
(for each button-press.) My initial failure was with IPv6, so I tried IPv4 and see the same error.

Code: Select all

[Sat Aug 11 20:02:20.154121 2018] [:error] [pid 12355] [client 192.168.1.200:41826] PHP Warning:  Unknown: function '0' not found or invalid function name in Unknown on line 0, referer: http://192.168.1.204/mythweb/remote/keys

User avatar
pgbennett
Developer
Posts: 241
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Mythweb waits 12 seconds after establishing a new socket

Post by pgbennett » Mon Aug 13, 2018 12:10 pm

I have no error message like that. Very few messages in the log, no message appears more than once. Using Ubuntu 18.04 and MythTV 30-Pre.

User avatar
bill6502
Developer
Posts: 1051
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Mythweb waits 12 seconds after establishing a new socket

Post by bill6502 » Mon Aug 13, 2018 1:57 pm

Thanks Peter. I fired up mythweb on my 18.04 host and (after a few configuration fixes)
mine works too. The :error above is now a php7:warn, but there's no delay after
pressing the key. Seem OK to ignore it 'til a PHP guru can spot a fix.

On my 16.04 host, I found an extra link in /etc/apache2/sites-enabled
and it now looks like this:

Code: Select all

lrwxrwxrwx 1 root root 45 Apr 14  2015 000-default-mythbuntu.conf -> ../sites-available/000-default-mythbuntu.conf
lrwxrwxrwx 1 root root 35 Jun  4 07:07 default-ssl.conf -> ../sites-available/default-ssl.conf
lrwxrwxrwx 1 root root 31 Apr 14  2015 mythweb.conf -> ../sites-available/mythweb.conf
I did: sudo a2dissite 000-default.conf and now get the proper action in 16.04 too.
Restarted apache2 of course: sudo systemctl restart apache2.service

Post Reply