Internet Windows Android

1s 8.2 freezes. How to close a frozen program

1) look at the amount of memory allocated by rphost on the 1C server. If you have an x32 version of the server, then the process will be able to use a maximum of 1.75 GB of RAM
If there is not enough memory, then the server cannot accept new connections or hangs when the current session needs more memory
www.viva64.com/ru/k/0036
2) Look at the settings "Settings of the working server" perhaps the wrong settings are set. I had the same problem and the server kept crashing. My settings are in attachment. The server is allocated 11 GB.
3) There may be problems in setting up Postgressql.

Provide your server characteristics, database sizes, Postgressql configs. It's hard to say without information.

My PostgreSQL config: https://drive.google.com/file/d/0B2qGCc-vzEVDMERVW...
this config is matched to the available amount of RAM.
PostgreSQL installed on Linux, 3 GB RAM, 3 CPU cores.
Server 1C8: 11 GB RAM, 5 CPU cores
4 bases approximately 1 GB each (uploaded to dt)

Give all the characteristics of your server: a 1C8 server and a physical or virtual database, operating system, the amount of RAM on each server, what CPU, how much RAM do rphost processes take up, how many of them? Are you using a RAID array?

Previously, I myself used PostgreSQL, but, in the process, I encountered some problems when working with the database on PostgreSQL and recently switched to MS SQL.

Your server is not bad for data bases. In order to use PostgreSQL, you need to be very good at configuring it. When the bases are small, many tuning errors are "forgivable". When we just started implementing 1C + PostgreSQL, we also had very frequent problems with the database (there were frequent freezes, it worked slowly). PostgreSQL is better to use on Linux than on windows. I myself am not a database specialist, to set up the database server we hired a specialist from 1Sbit and he set it up for us and there were no problems in work after that.

Advice:
Do not be stingy with your databases, hire a database specialist who can set it up for you. One person cannot be an expert in everything.

1) how long ago did you check the database itself and reindex? VACUUM and REINDEX
2) Have you done testing and fixing the database using 1C for a long time?
3) is the database log file moved to a separate HDD?
4) Is the HDD heavily loaded?

Consider switching to MS Sql, often it requires "almost" no configuration and is easier to use. Unlike PostgreSQL, MS Sql is ready to work out of the box, but PostgreSQL needs to be configured.

If you have any questions, write, maybe I can help you in Skype: tisartisar

Hire a Database Specialist

Why we switched to MS SQL:
we use the UT configuration and at the end of the month sometimes there were errors that could not be solved in any way. If you transfer the database to file mode and start closing the month, then everything was closed normally, the same database was uploaded to the PostgreSQL server when calculating the cost, errors occurred. At that moment, we were half a year behind in closing months due to the occurrence of floating errors. We created a test database on MS SQL and the month that could not be closed on PostgreSQL on MS Sql was closed. Also rounding of prices in the price list does not work correctly on PostgreSQL. In fact, the work of 1C on PostgreSQL is supported, but it is still recommended to use MS SQl.
Because of this, it was decided to switch to MS SQL. the stability of 1C is more expensive.

I'm glad I could help, please contact me if you have any questions or problems.

1) how much memory is allocated to MS SQL server? this is configured in the MS SQL server itself.
2) Test the database using 1C tools regularly
3) an article on how to set up backup and maintenance. This is important and should be done regularly. I do every day. Check out all 3 parts of the guide.

The impact of locks on the performance of 1C: Enterprise 8

The gilev team has been working on performance issues for many years and successfully solves issues such as eliminating lock waits and deadlocks.

Below we describe our experience in solving these problems.

Detection of blocking problems in 1C

Multiplayer performance issues are not necessarily due to bad code or bad hardware. To begin with, we need to answer the question - what performance problems exist and what causes them?

It is impossible to manually track the activities of hundreds of users; you need a tool that automates the collection of such information.

There are many tools, but almost all of them have one very significant drawback - the price.

But there is a way out - we choose as an analysis tool

We will investigate the problem on MS SQL Server, so we will need the following services from this set:

1. Monitoring and analysis of long requests(read more about setting up here) - needed in order to assess the presence of long operations to the subd.

Actually, the fact of their presence allows us to say that there are performance problems, and the problems lie in the lines of the 1C configuration code, which the service will rank in order of importance. Problems at the top of the list should be addressed first. Such solutions to problem strings will bring the greatest effect, i.e. will be the most useful and useful for users of the system.

(read more here) will allow us to assess whether the time of long (long) requests is actually caused by waiting for locks or there are other reasons (non-optimal code, overloaded hardware, etc.) The service will show the reason for the request to wait, namely the resource that was blocked and who blocked it. Those. we will understand the presence of blocking problems and their causes.

3. Analysis of deadlocks in 1C and MS SQL server(read more about the setting here ) - will allow us to evaluate more complex situations with waiting for resources, when several participants have already “captured” some of the resources with a lock and now they have to wait, they have to wait for each other because they cannot release the occupied resources before completion of the capture of other resources blocked by neighbors.

In general, in such a difficult situation, you can’t figure it out manually, you need such a service.

4. Equipment workload control(read more about setting up here ) helps us answer questions - how many users are in the system, do they have locks, how many locks, can the hardware cope with the load?

The services are very easy to set up, but even if you still have questions, there are!

With the help of the above tools, we have objective information about the performance of the system. This allows us to correctly assess the situation and propose adequate measures.

In fact, we get information about all performance problems and can accurately answer questions like “how many problems are in the system”, “where exactly do they occur”, “each of the problems with what frequency exactly”, “which problems are significant and which are minor”. Those. we see all the prerequisites that formed the cause of the problem.

Services allow you to significantly improve the understanding of the conditions for the occurrence of problems, without forcing you to manually delve into such things as the data storage structure of an infobase at the DBMS level, the mechanism for applying locks, etc.

As a result, we get a picture of the performance that is measured

- request time (of course, ranking the problem requests by weight (request time by the number of calls to this request);

- waiting time for locks;

So, we launched the Block Expectation Analysis service

In the upper table, the service shows a list of “victims” of blocking, taking into account the total weight of the “severity of expectations”.

In the lower table, for each victim, one or more participants in the “struggle for a highly competitive resource” are considered, where the expectation on the block arose.

In the lower table, open the detail on the fact of one of the “timeout” events. Like in the picture for example.

Highlighting the line with the “culprit”, we will see that the _Reference64 table has become the bottleneck, and there was a problem on the clustered index with the “unknown” area. Perhaps in the future we will rename it to “table”, since in fact this behavior is typical for increasing / enlarging the blocking area.

The line with the “victim” shows which code was hostage to the situation and could not block everything just the line “by key” (the minimum data blocking area in this table).

You can solve this problem "correctly" and "easily".

It is more difficult to follow the right path - in fact, you need to rewrite the code, minimizing the likelihood of such situations occurring.

One of the factors, strange as it sounds, is the decrease in duration.

You can reduce the duration of a transaction:

1. rewriting the algorithm

2. by rewriting the query (a faster query reduces the chance of locks in complex transactions on tables that sometimes may not even be in the query!)

2.1 by adding the missing covering index (sometimes the index not only speeds up the query, but also reduces the read area of ​​the data, which reduces the likelihood of blocking)

3. by reducing the amount of data processed in a transaction (in addition to the linear speed, we also remember about lock escalation)

4. increasing the productivity of equipment within each stream

Request execution time

1) different users can work in parallel with different data
2) different users must work strictly sequentially with the same data

However, you can optimize the use of locks, thereby reducing the overall wait time.

How locks work (this paragraph can be omitted)

Locks are handled by a special SQL Server module called the Lock Manager. Its tasks include:

  • creation and installation of locks;
  • removal of locks;
  • lock escalation;
  • determining the compatibility of locks;
  • elimination of deadlocks (deadlocks) and much more.

When a user makes a request to update or read data, the DBMS transaction manager passes control to the DBMS lock manager to find out whether the requested resources have been locked and, if so, whether the requested lock is compatible with the current one. If the locks are incompatible, the execution of the current transaction is delayed until the data is unlocked. Once the data is available, the lock manager acquires the requested lock and returns control to the transaction manager.

The main reason that reduces performance is blocking

Lock waits are a major performance problem in multiplayer mode. And this is understandable, because they increase the waiting time for operations, and hence the response time. Is it possible to say that waiting on locks is not correct and a mistake of a multiuser system? This cannot be said, since the resource locking mechanism itself ensures the integrity of the data. With the locking mechanism, concurrent data is WRITTEN SEQUENTIALLY.

Difference between necessary and redundant locks

When a user reports an error waiting on a lock, from his point of view, this is always an error, because, for example, it interferes with his work - the time it takes to complete his work increases.

Experience suggests a simple rule, if more than half of the request execution time it actually waits for a blocked resource, then you need to look: it may be possible to optimize some of the locks, reduce the resource blocking time.

Here, as if by chance, I introduce a definition:

Waiting on the block is a situation that occurs when two users try to capture the same data at the same time. In this case, one of these users is blocked, that is, it must wait until the end of the transaction of the first user.

A transaction is a set of calculations and operations with data (the most striking example is when conducting a document), performed as a whole. Failure to complete any of the transaction's operations results in the cancellation of the entire transaction.

So, users in multi-user infobases can often complain that it is impossible to work because of these locks, while there may indeed be locks in the code that are not needed (redundant) in this place.
And also in the configuration code, they themselves may not be blocking, you can read about them, for example, here http://kb.1c.ru/articleView.jsp?id=30 (the article is a fragment of the book by P.S. Belousov, A .V. Ostroverh "1C: Enterprise: from 8.0 to 8.1".). I offer a simplified way to explain the difference between locks using a simple example like this:

In your configuration in 1C:Enterprise mode, create two identical invoices with the same product composition. But be sure to specify the different warehouses of receipt.
In the swipe handling code, you need to add a line with the display of a message on the screen (or other code that can delay the execution of the swipe processing by 21 seconds (the lock timeout occurs after 20 seconds if the default parameters)).
Post two documents.
If a timeout occurs, and logically the goods arrive at different warehouses, there are redundant locks in the application. Business logic (consider common sense) there should be no locks here.
If we now make identical warehouses in these two waybills. Then the created locks as a result of an attempted simultaneous conduct will result in a REQUIRED lock and this is GOOD!

Those. while the invoice makes changes to the stock balance, the other must wait.

Of course, even this simple example leaves many questions. For example, if the documents are from one supplier and the debt on it “moves”. And if not only the remains in the warehouse are moving, but several registers, but documents of various types.
But the most important question is WHAT BUSINESS LOGIC SHOULD NOT HAVE BLOCKING. Who prescribes this business logic and where in the context of locks? But let's talk about everything in order.

Excessive locks - superfluous - which are not needed from the point of view of ensuring data integrity and at the same time reduce the overall performance of the system, increasing the total "idle" time - waiting on locks.
The necessary lock occurs when two users capture the same resources (data objects). If users work with non-overlapping resources, but there is a wait on the lock, then the lock is considered redundant.

The most understandable criteria for lock redundancy are:

1. Mutual blocking;

2. The level (area) of blocking is higher than necessary (as a special case of increasing the level of blocking, the so-called escalation);

3. The lock time is longer than the "real" use of the lock object.

Having received information about the grouping of problems in the context of 1C:Enterprise metadata, I recommend paying attention primarily to the objects:

  • Constants
  • Subsequence
  • Accounting registers
  • Accumulation registers
  • Information registers
  • Calculation registers

1) Until recently, there was a well-known recommendation not to write anything in constants. In extreme cases, do this from under one user, and then remember that while the user “writes” one constant, not only this, but also any other constant, other users will “wait”. Therefore, it is especially dangerous to use constants in handling conduction. The values ​​of all constants are stored V one resource.

The figure shows the physical location of the SCP configuration constants in the MS SQL Server 2005 database table.

This means that if one constant is blocked, all constants will be blocked. The DBMS imposes a lock on the ALL single ROW of the table, i.e. for all constants.

However, in recent releases of the platform, the storage of constants has changed. Now each constant is a separate table. However, don't get too carried away, if you create thousands of tables, you can catch a lock on the master base.

Attention, if your configuration has existed for a long time, then you can change the storage format by "restructuring" in Testing and Correcting the configurator.

2) Refuse to use the Sequence metadata object. At least from movements during operative conduct, to carry out with non-operative (additional conduct). See how it is implemented in the latest versions of SCP.

3) If the system performs an operative recording of movements in the accounting register in a multi-user mode, then it is recommended:

  • enable the split totals mode for this register;
  • do not use register balance control during operational work.

4) In the accumulation register, in cases where there is no need to obtain "operational" data, you can enable the division of totals, which will increase the parallelism of data recording and speed up the work as a whole. Carefully monitor the measurements so that the "residuals" can be obtained with maximum detail on the measurements.

5) You can get rid of some redundant locks created by the platform only by . In the automatic mode of operation of the configurations, the platform "takes over" the blocking of resources. The price of carefree use of automatic mode is locks at the boundaries of index ranges, locks on an empty table, lock escalation.

These locks completely disappear from the data in the transaction. That is, this deadlock will not be possible when running in managed mode.

I have already said “managed blocking”, “managed mode” several times. You need to understand that there are two types of blocking:
DBMS locks are set automatically at the DBMS level when queries are executed.
1C:Enterprise locks are set automatically when writing (modifying) data and always manually when reading data.

A meticulous reader will say that 1C also divides into object and non-object locks, but now we will not touch this approach.

But I note that it imposes more requirements on the qualifications and experience of a 1C specialist.

6) Missing indexes (especially in complex queries) are generally the main factor in the occurrence of a higher level of locks than necessary. Those. a paradox, on the one hand, I said that before optimizing the query, I said that you first need to look at locks, and now I say that in order to optimize locks, you need to optimize the query. I have an excuse, moving the configuration to managed locks reduces excess locks even in sub-optimal queries. This is due to the reduced transaction isolation level, which in turn gives the DBMS lock manager less reason to acquire an excessive lock.

The main causes of excessive locks (to summarize the above)

— design errors
(the degree of parallelism is determined by “how finely the data is sliced”: parallel work with two rows of the table is possible, work with one row will only go sequentially)
(mistakes in the use of metadata: recording constants, sequences, operational accounting on accounting registers)
- excessive blocking due to the fault of the automatic mode (platform - DBMS link).
— suboptimal query performance
(for example, when scanning a table, the entire table is blocked - redundant area
and blocking time increases - excess time, additional blocking increases the likelihood of blocking escalation)

As you can see, the task of optimizing locks is “multifaceted”. It is necessary to represent as best as possible the “context” that provoked the problem. On what resources, what code. How realistic is this lock needed, or is it redundant.

A child and an adult have a sore throat. When the doctor asks the question, "What's wrong?", the child will look at the doctor and scream (trust me, I know), while the adult will point out the symptoms of the disease. This apparent difference directs the doctor to different methods of identifying the problem.
With a child, the doctor must comply a lot of tests, collect data, combine them, perform analysis, and only then make recommendations. Whereas with an adult, he will ask a few questions and, since the number of initial data is small, the time to analyze and identify the problem will be significantly less. As a result, recommendations will be issued much sooner.

Use our services and you will have more opportunities to analyze the problem and find a solution for free!

How to close the program if it freezes and stops responding. Why do programs freeze? Who is to blame and what to do? In this article, we will try to analyze the main causes and solutions for this problem.

The open program has stopped responding to your actions, the cursor has frozen or turned into an hourglass, the window of the program itself displays the inscription “Not responding”, are you clicking on everything, nervous and don’t know what to do?

First of all, calm down and read the article. Absolutely everyone has been in this situation, all programs are written by people, so they are not perfect. The main thing we need to understand is how to act correctly in such cases and why this happens.

Firstly, you need to figure out whether the program is really frozen and all the symptoms described above are observed, or whether you just launched a resource-intensive application or program from which your system does not hang, but simply slows down.

What not to do if the program freezes

Let's look at the most common mistakes that many novice users make, thereby wasting their time.

- Shout, hit the keyboard (it's definitely not her fault).
- No need to try to run the same program again, or even more so other programs - this will only aggravate the situation.
- Pull out the power, turn off, reboot (this is an extreme method).

What to do if the program freezes

1. Before moving on to more radical methods, try closing it in the taskbar by right-clicking on the hung program and selecting the appropriate item.
2. If it doesn't help, go to the proven method, for this we need to start the task manager. You can call the task manager with the key combination Ctrl + Shift + Esc (Windows 7) Ctrl + Alt + Del (Windows XP).

We are interested in the "applications" tab, here all applications running on the computer are displayed at the moment. We are looking for an application that is frozen (in my example, this is a program) and click → End task. Usually this is enough! Did not help → point 3.
3. What should I do if the program continues to hang? Go to the next tab → "Processes". The fact is that with any program that you run on your computer, some process or processes are associated. And the program that is currently frozen also has its own process, which you can find out by right-clicking on the program shortcut and select → "Properties". In my example, this is the process → VideoConverter.exe

Selecting the processes tab → look for your process (in my case it is “VideoConverter.exe”) and click → “end process” or, to be sure, → right-click on the process → “End process tree”

This is how, using standard Windows tools, you can solve the problem with a frozen program. You can also close a frozen program using third-party programs, as an example, the program

Well-known to IT specialists, the complaint of users “hanging 1C” has many reasons. To make a correct “diagnosis” – to identify and analyze a problem – it needs to be reproduced, because a problem that cannot be reproduced is, as a rule, almost impossible to solve. Having understood the symptoms of 1C freezing, we will take the first step towards an efficient system.

Very long system startup

A long launch of a heavy configuration under one user for the first time after adding IB to the list of databases on the computer is a normal phenomenon. During the first run, the configuration is cached. The second and subsequent launches should be faster.

A system startup that takes a long time may indicate problems with the architectural implementation of the configuration. Most of the configuration is only read by the framework the first time the desired metadata object is accessed. A long start indicates the likelihood of using a large number of metadata objects (many calls to various common modules, processing, etc.).

It should be noted that the first time the text of any module is accessed, it is compiled. This process also takes time, which is especially noticeable if there are a lot of modules. Thus, the problem of slow startup is solved by modifying (optimizing) the configuration, the purpose of which is to disable the execution of all optional algorithms that are executed at system startup.

There is a possibility that the configuration at startup is trying to read data from the Internet. It also increases system startup time.

Very long opening times

The long opening of forms may be due to:

  1. A large number of controls on the form - time is spent on creating the form and linking the location of the form elements;
  2. Execution of algorithms during form initialization. It is possible that when creating the form, some conditions are checked and / or the related objects are read from the database.

The first problem is "treated" by simplifying the form. For example, some of the controls can be placed in separate forms, which can be even more convenient for the user. For example, if the form has the address field "City", "Street", "House", etc., then it is better to edit the address in a separate form.

The second problem is solved by analyzing the actions performed during the creation and opening of the form, and by optimizing these algorithms. Perhaps some of the algorithms are already outdated, and some can be simplified and optimized, for example, eliminating or minimizing access to data in the database.

As an interactive action, consider the user's attempt to select a value in a form element. In response to it, the system "thinks about something." This may happen for the following reasons:

  1. Algorithms that run on a given action examine or calculate associated data that affects the value selection mode;
  2. The select form that opens to select this value reads all objects from the database when it is initialized.

To solve the first problem, you should use the "Performance Measurement", find resource-intensive algorithms and optimize them.


The second problem can often be solved by simply analyzing the implementation of the select form. For example, you should make sure that the dynamic list property is set to "Dynamic Data Reading", the property "Main Table" is correctly set, and the implementation of the list does not use obviously resource-intensive algorithms.

There are also situations when, when opening the selection form, any related data is read from the database (for example, when opening the "Nomenclature" selection form, the balance of goods in warehouses is read). Typically, this is not the best solution. Reading related data is best done asynchronously, after the form has been opened. This will cause less discomfort for the user, because. after the form is shown, the user will spend some time perceiving the opened form, and this time can be spent loading the associated data.

Very slow response to updates

One of the trivial symptoms, however, can tell about some system problems: the 1C update freezes when starting backup. This mainly happens when updating via the Internet and, most likely, indicates that the configuration has not been updated for a long time and the releases, rolling one on top of the other, caused a freeze. You can prevent such a problem by installing updates in a timely manner, and if you encounter it, you can simply interrupt the backup process. After starting the configurator, the database will start with the changes made in the normal mode.

It should be noted that 1C 8.3 freezes during updates most often also because it requires more resource-intensive hardware than previous versions of the platform. It is worth paying attention to the amount of RAM and, if necessary, increase it - this, in principle, should help in solving the problem "1C freezes when updating the configuration."

Long-term recording of objects/posting of documents

In this case, "photo treatment" is practically excluded, since the reasons can be very diverse, starting with a large amount of data in the object, ending with waiting on locks.

But even in THIS case, it is possible to outline a direction for analysis.

The absence of significant changes in the recording time, due to the time of day or the number of users (according to a rough, subjective estimate), indicates a problem in the code or in the data volume of the object. For analysis, it makes sense to use the “Performance Measurement” tool.

A cardinal change in the recording time with unclear dependencies requires a statistical analysis of the appearance of the problem, i.e. performance analysis. The easiest way is to analyze log usage. An additional advantage here is that the 1C:Enterprise 8 platform supports saving log data to a SQLite format file. This will allow you to use SQL queries to parse the log data. It is quite possible to get the time of object writes from the log data, given the fact that each object write is performed in a transaction, and each transaction has its own identification number.


If the result of statistical analysis showed that the object recording time depends on the time of day, and not on the number of users, it is necessary to analyze the workload of the 1C server and the database server. It is possible that routine processes are running on the server that take up unnecessary resources.

If the write time of objects depends on the number of users, the problems are most likely in the code (possibly waiting on locks) or in the throughput of the hardware. To solve them, you should involve a specialist with the competence of "1C: Technological Expert", since there are no unified rules for solving such a problem.

If some program has stopped responding to you, it doesn’t respond to either the mouse or the keyboard, and perhaps even the inscription “the program is not responding” has appeared, this is called a frozen program.

Sometimes it happens that a frozen program does not interfere with your work, and sometimes, on the contrary, due to one frozen program, the work of the entire OS can be slowed down, in any case, the problem must be solved, something must be done.

What not to do:

1) Pull the plug out of the socket is the biggest mistake you can make in this situation. An abrupt power outage for a computer is a lot of stress. This item also includes turning off the computer using the start button on the system unit, and turning it off by pressing the power supply switch. The essence of these methods is the same, you cut off the power supply.

2) Press the reset button- this button is located on the front of the system unit, and is used to force a reboot. It should be pressed only in the most hopeless situations, when other methods do not help.

3) Make extra moves- if, due to a frozen program, your operating system began to slow down a lot, then any unnecessary action will only aggravate the situation more. By unnecessary actions, I mean trying to restart a frozen program (in no case should this be done), launching any other programs, opening the start menu or another menu. If the situation is particularly critical, then you should not just move the mouse, as the cursor may freeze and it will be more difficult to solve the problem.

4) Wait a very long time- as a rule, it is enough to wait five minutes in order to understand that the program is frozen, if you have a weak computer, give it 15 to 20 minutes. It is usually useless to wait further.

5) Get nervous- kicking the system unit with your foot or banging the keyboard on the table will not help matters. I specifically wrote this paragraph, because for some unknown reason people sometimes do this (probably our past affects when the tube TV did not want to work, they usually hit it with a hand and it helped). A computer is not a tube TV, no need to beat it.

What should be done

You need to try to close the program, if clicking on the cross in the upper right corner and the combination alt + f4 do not help, then you need to do the following:

Press the key combination to call the task manager:

For Windows xp “Ctrl + Alt + Del”.

For Windows 7 "Ctrl + Shift + Esc".

In the task manager, go to the “Applications” tab, if your program is displayed in the task section, then select it and click on the “End task” button. If there is no reaction immediately, you do not need to press this button again, you just need to wait a bit. After a while, a window will appear with a warning that data may be lost, you will need to click on the “Finish Now” button. For an example, see the screenshot (I completed the working program, so your text will be different, but the principle is the same).

If this method fails to terminate the program, then right-click on the hung program and select "Go to Process" from the drop-down menu. You will automatically be taken to the “Processes” tab, the desired process will already be selected, you just need to click on the “End Process” button.

If the hung program is not displayed in the "Applications" tab, then you need to go to the "Processes" tab, find the process of the hung program and end it. It is easiest to search for a process by name, you can also search by the degree of processor load, usually this percentage is large for a hung application.