A. problem solving and recommendations

The company “Microimpulse” provides professional technical support on projects, including administration and server configuration, Smarty, portals, management systems database, and customize data replication, load balancing, caching, redundancy and more.

Detailed information on the cost of technical support can be obtained from your Manager.

In addition, to ask a question or find a solution to a particular problem in the technical community http://forum.micro.im

A. 1. Problems with the server Middleware, and associated systems and solutions

Not displayed list of TV channels on the subscriber’s device

Possible causes and solutions:

  • For a subscriber/account no installed packages containing the required set of channels and streaming services.
  • The composition is connected for a subscriber/account tariff packages not found any available streaming service.
  • Cache the list of channels is empty, you must run the command cache_channel_list, see Caching channel list.
  • After installing the update is not performed flushall that led to damage of the cache. Cm. in Install updates Smarty.

In the application of the subscriber errors occur and/or when you turn on the console an error occurs, the authorization

Possible causes and solutions:

  • After installing the update is not performed flushall that led to damage of the cache. Cm. in Install updates Smarty.
  • If you are using a single Redis server and directory to save the dump over the place, this can lead to errors “MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk”. You need to release free space and disable the option stop-writes-on-bgsave-error, see configure caching.

In the TV program on the subscriber’s device does not display the icons of the availability of recorded shows

Problem: when enabled and configured the PVR service subscriber is unavailable switch gears from the record.

Possible causes and solutions:

  • For a subscriber/account is not selected tariff package that contains the appropriate and accessible streaming service.
  • Created technical work affecting the operation of the service, see Technical work.

High CPU load on the MongoDB server

Problem: the CPU consumption on the server MongoDB close to 100% across all cores, and reports are not available in viewership.

Possible causes and solutions:

During the installation of the update Smarty arose a surge load on the server, Middleware and DBMS

Possible causes and solutions:

  • If you upgrade the scheduler has been running the import command EPG, try to execute the command flushall could lead to invalidation conflict of interest, since one process creates them, and the other invalidates. This can result in the mass invalidation of objects in the cache. To prevent such a situation when you install the update you must complete a background command epg_import and cache_channel_list. Cm. in Install updates Smarty.

At a mass number of subscribers there is an increased load on the CPU and it does not decrease

Possible causes and solutions:

  • Not enough workarou uwsgi or nginx. It is necessary to conduct the optimal configuration of the application server and web server in accordance with General guidelines under high load.
  • Insufficient RAM or CPU. Cm. in System requirements. A temporary solution might be to enable nginx cache, it is necessary for the most frequent queries to use the handler @cached in the nginx configuration, for example:
location /tvmiddleware/api/channel/list/ {
  try_files $uri @cached;
}
location /tvmiddleware/api/program/list/ {
  try_files $uri @cached;
}

Periodically there splek network load on the Middleware server

Possible causes and solutions:

  • Enabled “Enable auto-refresh the data without restarting the device” device settings (see Settings STB and widgets). If this load is undesirable, you should disable opico. Then a full list of TV channels and EPG will not be performed.
  • If an incorrect network or the virtualization could be a situation the retention of packets in queues, when queue release may lead to a surge of requests, and as a result a surge of traffic. You need to troubleshoot network problems and provide fast data transfer.

Some pages of the admin panel open with a significant delay also delays operation of devices

Possible causes and solutions:

Application server, uwsgi is not loaded, Smarty is not available

Possible causes and solutions:

  • No write permissions for user www-data directory to /var/log/microimpuls or /var/log/microimpuls/smarty. You must allow writing to these directories.
  • Another reason - see the logs /var/log/uwsgi/.

The import command stops epg_import EPG, EPG is not imported from the admin panel

Possible causes and solutions:

  • No write permissions in /usr/share/nginx/html/microimpuls/smarty/media. You must assign user and group www-data to the smarty directory, perform the command: chown-R www-data:www-data /usr/share/nginx/html/microimpuls.
  • Another reason - see the logs /var/log/microimpuls/smarty/smarty_epg.log.

In the application the subscriber is not displayed icons of television and picture transmission

Possible causes and solutions:

  • Incorrect option value MEDIA_BASE_URL (see description of the main parameters) or incorrectly configured nginx. For debugging, you must open the portal in the browser and using symfony developer tools (e.g. Firebug) to track requests for pictures.

In the application of the subscriber after some time, get off the clock and EPG

Possible causes and solutions:

  • If the device is used to synchronize time with NTP when the connection with the NTP server time may deteriorate. It is necessary to ensure proper operation and accessibility of the NTP server. Time on the Middleware server must also be synchronized with the time on the server PVR.

Not working the servers MicroTS, errors occur in the interaction Smarty video servers Microimpuls

Problem: monitoring data is collected, the monitoring does not appear transcoding streams, tasks, records etc.

Possible causes and solutions:

  • The port of the JSON-RPC API of the respective service unavailable server Smarty. It is necessary to ensure their availability.
  • Installed wrong version of package python-jsonrpctcp. You need to install the package from the repository Microimpuls, see Installing Smarty and modules.

A third party application that uses TVMiddleware API, can’t access from another domain due to CORS policy

Possible causes and solutions:

  • In the config file of Smarty you need to set the CORS exception for that domain in the options CORS_ORIGIN_WHITELIST, then in the HTTP headers for requests from that domain will be granted the necessary permissions. Example: CORS_ORIGIN_WHITELIST = ( ‘example.com’, )

Do not load the cover art and movie description from IMDb

Possible causes and solutions:

  • If you frequently use the function to download information from IMDb in the admin panel, the IP address of the server Smarty can be blocked by the system of protection against bots Either. To resolve this problem, it is necessary to reduce the activity of the queries or contact technical support service Kinopoisk.

Медленно обрабатываются запросы к Billing API, медленно сохраняются изменения в панели администратора при редактировании тяжелых объектов

Possible causes and solutions:

  • При длительной работе Smarty накапливает много данных в кэше для быстрой работы приложений. При редактировании данных администратором, при обработке API-запросов от биллинга может возникнуть необходимость инвалидации данных по большому числу связанных объектов, что вызывает длительную работу сервера для обработки такого запроса. Чтобы данные операции производились в фоновом режиме и не тормозили работу необходимо включить поддержку потоков, установив опцию enable-threads в значение true в файле конфигурации uwsgi, после чего перезапустить uwsgi.

A. 2. Recommendations

Recommended kernel parameters

Changes you need to make the file /etc/sysctl.conf:

kernel.shmmax = 2473822720
kernel.shmall = 4097152000
net.core.rmem_default = 8388608
net.core.rmem_max = 16777216
net.core.wmem_default = 8388608
net.core.wmem_max = 16777216
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_recycle = 0
net.ipv4.tcp_tw_reuse = 0
net.ipv4.tcp_keepalive_time = 10
net.ipv4.tcp_fin_timeout = 5

Then run the command to apply the changes:

sysctl -p