• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Task Execution Timeout Event Overview
2
3## Overview
4
5Task execution timeout indicates that the execution duration of the monitored service code logic exceeds the expected duration. To better locate and analyze problems, use the [Task Execution Timeout Detection](apptask-timeout-guidelines.md#task-execution-timeout-detection) mechanism and analyze task execution timeout based on the [log specifications](apptask-timeout-guidelines.md#log-specifications).
6
7## Detection Principles
8
9For details, see [Detection Principles](apptask-timeout-guidelines.md#detection-principles).
10
11## Available APIs
12
13You can subscribe to task execution timeout events **EVENT_APP_HICOLLIE** using the APIs provided by HiAppEvent. When the system detects that a task execution times out, it captures maintenance and debugging information and sends the timeout callback to the application process through HiAppEvent.
14
15- [Subscribing to Task Execution Timeout Events (C/C++)](hiappevent-watcher-apphicollie-events-ndk.md)
16
17## Field Description
18
19### params
20
21The **params** parameter in the event information is described as follows:
22
23| Name| Type| Description|
24| -------- | -------- | -------- |
25| time | number | Event triggering time, in ms.|
26| foreground | boolean | Whether the application is running in the foreground. The value **true** indicates that the application is in the foreground, and the value **false** indicates the opposite.|
27| bundle_version | string | Application version.|
28| process_name | string | Process name of the application.|
29| pid | number | Process ID of an application.|
30| uid | number | User ID of an application.|
31| uuid | string | Error ID, which is generated based on fault information and uniquely identifies crash faults of the same type.|
32| exception | object | Exception information. For details, see **exception**.|
33| hilog | string[] | Log information.|
34| peer_binder | string[] | Binder call, binder call chain, and related stack capture information.|
35| memory | object | Memory information. For details, see **memory**.|
36| external_log | string[] | Path of the error log file. If the directory files exceed the threshold (for details, see **log_over_limit**), new log files may fail to be written. Therefore, delete the log files immediately after they are processed.|
37| log_over_limit | boolean | Whether the size of generated fault log files and existing log files exceeds the upper limit (5 MB). The value **true** indicates that the upper limit is exceeded and logs fail to be written. The value **false** indicates that the upper limit is not exceeded.|
38
39### exception
40
41
42
43| Name| Type| Description|
44| -------- | -------- | -------- |
45| name | string | Exception type.|
46| message | string | Exception cause.|
47
48### memory
49
50
51
52| Name| Type| Description|
53| -------- | -------- | -------- |
54| rss | number | Size of the memory allocated for a process, in KB.|
55| vss | number | Size of the virtual memory applied by a process from the system, in KB.|
56| pss | number | Size of the physical memory actually used by a process, in KB.|
57| sys_free_mem | number | Size of free memory, in KB.|
58| sys_avail_mem | number | Size of available memory, in KB.|
59| sys_total_mem | number | Total memory size, in KB.|
60