1C connection is not assigned a session. Setting the sleeping sessions. Deleting users via server console

Implemented in version 8.3.9.1818.

In version 8.3.9, we performed a significant number of tasks to optimize different mechanisms of the platform. Here I want to tell about one of them. This is an increase in web service performance.

Using sessions

Insufficient web service performance was explained by the fact that each web service call had significant overhead on creating and completing the session. Moreover, when creating each time the installation of parametroamer () was carried out, which in a typical configuration can be quite "heavy".

In addition, there was a functional flaw. Web services did not possess a state. It did not allow to implement the logic to preserve the state between the web service challenges.

In version 8.3.9, we finalized the web service mechanism (SOAP services, HTTP services, ODATA services). As a result, their productivity increased by about 10 times.

We conducted tests on the typical configuration of the company's accounting. In She, we added HTTP services that serve as a sample from the directory of counterparties. The test was that the client served as sequentially 100 appeals to the service. In the old mode of operation, it took 29.9 s. In the new operating modes on average 3 s.

These results were achieved due to the fact that we have implemented two different strategies to provide sessions:

  • Automatic re-use of sessions from the pool;
  • Managing sessions using HTTP headlines.

With automatic re-use of sessions, the client does not have the ability to influence the number of sessions and the time of their lives. It is simply automatically highlighted by a session from an existing session pool. Such a strategy is suitable for high-loaded public services to which customers who perform template operations and possessing unified privileges.

For example, it can be automating the trading activity of remote outlets, providing for the periods of peak load on the server. For processing, the desired number of sessions will be allocated. They will be completed as the load falls.

Another example is the receipt / placement of files in the document circuit configuration through HTTP services. For such operations, you can use the same special user.

Strategy for manual sessions implies that the client independently controls the number of sessions and the time of their lives. This strategy is better suited for high-infected systems within the same organization. You can implement your own algorithm that will manage the life of sessions and their number.

Controls

You can define the configuration objects in the configuration objects in the DEFAULT.VRD publication file in the DEFAULT.VRD publication file. In the configuration object tree, we have added two new properties of Web service and HTTP service objects:

  • Repeated UserSeisseans can take values \u200b\u200bto useAvtomatically, use, not use. The value usesavtomatically includes automatic re-use of the sessions from the pool, and the value to use includes control of sessions using HTTP headers.
  • In the properties of the atzhizuance, you can specify how many seconds there will be an inactive session before the platform is completed automatically.

The need for a compulsory completion of the user mainly occurs in the following cases:

  • Updating the information base;
  • Adding a new metadata object to configuration;
  • Carrying out preventive and repair work on the server;
  • Hanging a user session that prevents re-launching the application.

In this article, we will try to tell how to complete the user's session, which tools for performing this task are in the administrator arsenal, which completion options provide file, and which client-server version of 1C.

It is important to remember that when the session is enforced completion, data loss is possible. So, to exclude unpleasant situations, it is advisable to pre-warn users about shutdown.

Closing sessions from the configurator

When changes are made to the database structure, the configuration update in dynamic mode becomes not available. And the information window appears on the screen (Fig. 1).

The sequence of actions in this case is obvious:

  1. You must click the "Complete Sessions and Repeat" button;
  2. Wait for the database restoration windows;
  3. Press "OK".

It should be noted that the changes made to the program code do not require the completion of users, but without restarting the application on each specific computer, they will not work on this device.

Completion of sessions directly from the program

Most of the standard products of the firm of the eighth version of the Eighth Version have a mechanism in their set, allowing without much difficulty to remotely complete the user and provide the administrator to the database administrator. This is the processing "blocking connections with an information base."

You can find it one of two addresses:

  1. In one of the submenu of the "Service" section;
  2. Going to the processing operations section.

Fig.2

The appearance of the processing is presented in Fig. 2.

Features of this processing:

  1. Installing and removing the checkbox, and pressing the "Write" button turns on and offs the locking of users by deleting sessions and preventing new connections;
  2. The termination time cannot be empty or less than its start;
  3. In the case when the "Permistry Code" parameter is specified, it can be prescribed to the start string to ignore the lock, in front of the code specifying "/ UC";
  4. If the "permissive code" does not specify, then before the blocking expiration, it will be problematic to get into the database (you can try to delete the 1CVCDN file from the database folder);
  5. If instead of the "/ UC" parameter and password, to specify "/ conjunct-use users", where C is Latin, you can completely disable the lock for all users;
  6. Pressing the "Active Users, calls a window with a complete list of users (Fig. 3), where you can open the logbook or complete the session of each specific user.

Fig. 3.

The two above options work perfectly both in the file and in client-server mode. Next, we will consider cases characteristic only for server work.

Delete users from RDP

It is important to remember that disabling user sessions from servers is possible only with certain rights to this action.

When working with a remote desktop, you can complete the user sessions by using the standard task dispatcher. A simple interruption of sessions is a bit incorrect, but a rather effective way.

The second option to use task manager - remote connection with the ability to control to each specific session and exit the exit from the program for all rules. This method is long, and no one guarantees that while the output of one user is running, the program will not be launched by any other employee.

Deleting users via server console

With administrator rights for 1c servers cluster, it is necessary:


Very often, when working in server mode, users are not visible to the means of the platform, it is possible to remove them only through the console.

The most radical way of interrupting sessions

The situation where the methods described above did not work, it happens extremely rare. But in the case of its occurrence, there is another radical way to interrupt connection connections: physical reset server.

Of course, users who did not have time to complete the work and maintain the data will be extremely outraged by such a unfortunate attitude, but it is quickly and it is extremely effective.

For regulatory work in the 1C information database: enterprises 8 often need to receive mono-power access to the database. For example, to perform a backup database or execution of regulatory work on the DBMS server (reindexation, etc.), you must disable all active sessions.

Consider an easy way to disable users from the information base using the standard 1C server functionality: enterprises.

Standard functionality

Immediately make a reservation that it will be about the client-server version of 1C: Enterprises 8. To disable sessions, go to the server administration console. We will find the necessary information base in the list:

Going to the IB properties set the option "Lock the start of sessions is enabled." In this case, it can be necessary for a DVSETSI login / password of the information database administrator account.

Do not forget to set the session blocking period. It should also be provided that on the time of blocking sessions you need to stop all background tasks. This is done by the "blocking of regulatory tasks included".

If necessary, you can set the text of the message to users to which they will be notified 5 minutes before blocking sessions, as well as the permissions code to enter the information base during the session blocking period.

The permissions code can be used to enter the information base to perform regulatory work until the remaining sessions are active. Enter the permission code when connecting to the database is needed using parameters. For example, the parameter transmitted to the server will look like that if the resolution code is "123456".

Entering the database in this way, we will get mono-salt access to the information database. Other sessions will not be able to join us.

Notification The user on blocking sessions is as follows (depending on the message entered by the administrator). It appears every minute 5 minutes before the blocking period.

At the beginning of the session lock period, a notification appears:

After the session is completed.

Active sessions can also be disabled by removing them from the list of active sessions. This action is sometimes necessary to complete the hanging sessions.

In practice, the dispensing of users is better to report in advance to reduce the risks of data loss introduced by users, but not yet saved.

With an emergency completion of the client application (communication breakdown or closing of the brazier window), the client licenses "1C: Enterprise 8" can be blocked.

Free the locked client licenses can be rebooted by PCs.

With an emergency completion of the client application, the session is held for another 20 minutes. After that, in versions up to 8.3.5, the session was removed. From version 8.3.5 The session falls asleep in the sleeping state by default still held a day. Sleeping session does not occupy a client license "1C: Enterprise 8".

In version 8.3.5, the session falling time and the deletion time of an unused sleep session can be changed using a special or in the 1c configurator in the Administration / Options dialog / parameters, setting the recommended sleep session parameters:

  • passive sessions falling asleep - 300
  • sleeping sessions completion time - 10

By the way, who sleeps, and who is active can always look through the server console on the session bookmark. In the appropriate column "Sleep" there is a sign yes / no.

Complete (according to 1C), you can complete the work in the web client by the file "File" - "Exit". From version 8.3.8 added the completion command to the application header, next to the button About the program. It is displayed as a hyperlink with the name of the current user. After pressing the hypersdler opens a dialog with the user name and command To finish work.

Platform every 5 seconds makes Pinggi client Server 1C (seen packages of 4 bytes are visible). Based on "Pings", the server tracks the integrity of the connection to the client application. The absence of pings for about 2 minutes, the server interprets as a rupture of the connection.

Options 1C 8.3 sessions- A variable in which the value of the desired parameter is stored for the user session time. In fact, this is a kind of global variable attached to the current user session.

Use session parameters in 1C

Session parameters are specified only by programmatically, a universal interface to set the session parameters in the system. Usually they are set at the start of the system, in the "Session Module". If the parameter is not defined, an error will be caused during contacting it.

An example of setting a session parameter 1c

Consider a typical example of using session parameters - installing the current user. Example I will take from preparation for.

In the tree of metadata, we will create a new session parameter - the user, we will appoint it type - the Directory of Links. Physical

Get 267 video tutorials for 1C for free:

In the session module, create a procedure in which the current session parameter will be determined:

Procedure Code:

Installation procedureParmetrovonovsa (Required parameters) // We are looking for Piz. face name Text \u003d References. Physilestick. Foundation (Name user ()); // if not found - Create a new If the document is. Empty () then the manner \u003d reference books. Physilestick. Create element (); LETTER. Name \u003d username (); LETTER. Write down (); Text \u003d LETTER. Link; Ended; // Assign the session parameter for the user link to the Phys. directory Paramesans. Current user \u003d duct; Extrudresses

Top.