Problem/Motivation

Some files on some submissions remain in the _sid_ directory. At a glance at the submission times, there is no pattern to it. I haven't yet done a deep dive into the logs. This could be similar to #3034398: Private file system settings; absolute path not working except the private files path is absolute in this case, and the probem is intermittent.

Proposed resolution

Remaining tasks

Release notes snippet

Comments

cilefen created an issue. See original summary.

jrockowitz’s picture

Any temp file that is not saved to the database will remain in the _sid_ and then be automatically deleted in 5 hours.

cilefen’s picture

These files are attached to completed submissions as being in the _sid_ private file directory.

jrockowitz’s picture

@cilefen These 'temp' files should be listed in the 'file_managed' table and via /admin/content/files

cilefen’s picture

Indeed, they are and they are marked temporary. But what could have gone wrong that prevented them from becoming permanent?

cilefen’s picture

(It looks like cron hasn't been running on an affected site. We'll fix that.)

jrockowitz’s picture

If someone uploads a file via a webform, the file is automatically markup as temporary and then they do not submit the form, the temporary file will remain until cron runs.

jrockowitz’s picture

Status: Active » Closed (works as designed)
cilefen’s picture

They submitted the forms. That is, files attached to submitted forms are in "_sid_".

jrockowitz’s picture

Status: Closed (works as designed) » Needs review

Can you provide an example webform that can be used to replicate the issue?

cilefen’s picture

I sent it under a separate cover. The configuration allows drafts, and cron has not been running (although it is configured on the hosting platform to do so—that's a whole separate issue).

cilefen’s picture

It turns cron on the affected site may be completing some tasks but not others because it has been dying with this exception.

cilefen’s picture

Yes, the form is huge. I am down to it's either the half-broken cron executions or maybe, hugeness of the form.

cilefen’s picture

Status: Needs review » Postponed (maintainer needs more info)

Here's where I am:

  1. It definitely happens for this one giant multipage form, although I don't understand under what conditions.
  2. I can't yet reproduce it on a smaller representative form.
cilefen’s picture

Status: Postponed (maintainer needs more info) » Active

The affected files were uploaded in a file_managed that is inside a custom_composite, and they are all affected. However, I can't reproduce this by isolating this field in an otherwise empty form:

      other_institutions:
        '#type': custom_composite
        '#title': 'Other Institutions'
        '#title_display': invisible
        '#description_display': before
        '#multiple__min_items': '0'
        '#multiple__sorting': false
        '#multiple__operations': false
        '#multiple__add_more_input_label': Institution
        '#element':
          startdate:
            '#type': date
            '#title': 'Start Date'
            '#description': 'Approximate Start Date (yyyy-mm-dd format)'
          enddate:
            '#type': date
            '#title': 'End Date'
            '#description': 'Approximate End Date (yyyy-mm-dd format)'
          employer:
            '#type': textfield
            '#title': Institute/Employer
            '#placeholder': Institute/Employer
          funding:
            '#type': textfield
            '#title': Funding
            '#placeholder': Funding
          purpose:
            '#type': textfield
            '#title': Purpose
            '#placeholder': Purpose
          invitation:
            '#type': managed_file
            '#title': 'Invitation Letter'
            '#description': 'Upload copy of institution/employer''s invitation letter'
cilefen’s picture

Status: Active » Postponed (maintainer needs more info)

Whoops I didn't intend to change the status.

cilefen’s picture

Title: Files on submissions remain in directory _sid_, are therefore inaccessible to users » Files on submissions remain in directory _sid_, are therefore could be cleaned by cron and are inaccessible to users
jrockowitz’s picture

My only other guess is the size of the webform or the $_POST data is causing issues.

jrockowitz’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
cilefen’s picture

We are investigating https://docs.acquia.com/acquia-cloud/manage/files/broken/ as a possible cause.