Frequent connect calls

Created on 4 February 2021, almost 4 years ago
Updated 4 November 2024, 18 days ago

Problem/Motivation

The flysystem module calls the plugin function ensure() in runtime requirements and cron hook. The plugin ensure() function calls connect() thus leading to lots of SSH calls to the target. This leads to very slow page loads depending the the SSH response time.

Steps to reproduce

Visit the admin/config page and it leads to calling connect() to the target. Every cron run leads to calling connect().

Proposed resolution

First, the getAdapter() call in the Sftp.php plugin probably shouldn't call connect(). In the ensure() function, perhaps the connect() call should be placed in a check for force = TRUE.

Also, shouldn't the line (63) call getAdapter() rather than getting a new object? This would catch the missing adapter exception.

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States refman1073

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024