Why an IBM i session ends or signs off when it sits idle
How QINACTITV and QINACTMSGQ end or disconnect idle IBM i sessions, why Telnet sessions often end instead of disconnecting, and how to get your work back.
An IBM i can end or disconnect an interactive session after it has been inactive for a set time. The setting is host-wide, not part of the terminal app, and it applies whether you type on a phone or a PC.
The two settings
QINACTITV, the time-out interval for inactive jobs, is a number of minutes from 5 to 300, or*NONE. The default is do not time out. When the time passes, the system takes the action named inQINACTMSGQ.QINACTMSGQsays what that action is:
*ENDJOB: The inactive job is ended. This equalsENDJOB JOB(name) OPTION(*IMMED) ADLINTJOBS(*ALL).*DSCJOB: The inactive job is disconnected, along with any secondary or group jobs. The system valueQDSCJOBITVdecides whether disconnected jobs are eventually ended.- a message queue: Message
CPI1126("Job ... has not been active") is sent to that queue, and an administrator's program can decide what to do.
Local jobs signed on to a remote system through pass-through or Telnet are excluded from the timer on the system where they started. A timer on the system where you started a pass-through or Telnet session does not affect you. The system you sign on to applies its own.
Why a Telnet session often ends instead of disconnecting
If the action is *DSCJOB but the system cannot disconnect the job, it ends the job instead. IBM notes that Telnet sessions which use device descriptions named QPADEVxxxx cannot disconnect, because a reconnect needs the same device description and the automatic one is unpredictable. A session that uses a fixed device name can be disconnected and reconnected. See 5250 display devices and device names.
What to do when you are signed off
- Connect and sign on again. If the job was only disconnected and you use the same device name, the host can reconnect you to it. If the job was ended, unsaved work in that job is gone.
- Ask the administrator what
QINACTITVandQINACTMSGQare set to on this system. A low interval, or*ENDJOB, explains most surprise sign-offs. - If you need a longer time, ask for a longer interval, or for a message-queue handler that treats some users or devices differently. IBM describes the queue option as the way to decide per device and per user profile.
Related
- 5250 display devices and device names
- Why IBM i refuses a second sign-on
- Cannot automatically select virtual device
- SSH keep-alives and idle timeouts
- Why did my session disconnect?