Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting (or accessing) file hangs with 500 #55

Open
AJamesPhillips opened this issue Aug 24, 2021 · 8 comments
Open

Deleting (or accessing) file hangs with 500 #55

AJamesPhillips opened this issue Aug 24, 2021 · 8 comments

Comments

@AJamesPhillips
Copy link

AJamesPhillips commented Aug 24, 2021

Related to this forum question about async-lock timed out, I have tried to delete a file and tried to delete its parent directory. The first fails with:

Unable to delete https://ajp.solidcommunity.net/data_curator_v1/world_components.ttl: Error: Web error: 500 (Internal Server Error) on DELETE of https://ajp.solidcommunity.net/data_curator_v1/world_components.ttl

The second (deleting the parent directory) with:

Unable to delete https://ajp.solidcommunity.net/data_curator_v1/: Error: Web error: 500 (Internal Server Error) on DELETE of https://ajp.solidcommunity.net/data_curator_v1/world_components.ttl

@AJamesPhillips AJamesPhillips changed the title Deleting file hangs with 500 Deleting (or accessing) file hangs with 500 Aug 25, 2021
@bourgeoa
Copy link
Member

@AJamesPhillips
I just intervened on your pod to better understand that problem.

I can display test.ttl an there is an error on line 354
Could you check please.

I have no explanation it will be very helpful if we can track the problem together.

@bourgeoa
Copy link
Member

This is your profile. I suppose you flagged it trying to write trusted app localhost:8080
I can rebuild one from an other pod
This is not an explanation for the 500 error
image

@AJamesPhillips
Copy link
Author

AJamesPhillips commented Aug 25, 2021

Thank you @bourgeoa . Regarding the profile card, I didn't knowingly try to edit that manually (I don't really understand ttl yet). I really have no idea how that got corrupted / malformed?

Regarding the world_components.ttl file. Thank you for copying it to test.ttl. I have backups so it's not a problem. You can see what it should look like in: https://ajp.solidcommunity.net/data_curator_backups/2021-08-24_18-00-12/data_curator_v1/world_components.ttl

The application code I used to write those files is below. I can only imagine the write process is not atomic and got interrupted part way through? I think I only had one browser tab open with the application but if there were two and they performed the write at the same time could that cause it? If I reloaded the page mid write / stream could that have caused it? I'm using @inrupt/solid-client @ 1.11.0

async function save_items <I extends { id: string, title: string }> (items_URL: string, items: I[])
{
    let items_dataset = createSolidDataset()
    items.forEach(item =>
    {
        let thing = createThing({ name: item.id })
        thing = addStringNoLocale(thing, V1.title, item.title)
        thing = addStringNoLocale(thing, V1.json, JSON.stringify(item))
        items_dataset = setThing(items_dataset, thing)
    })


    try {
        // console .log("Saving...")
        // Save the SolidDataset
        /* let saved_items_dataset = */ await saveSolidDatasetAt(items_URL, items_dataset, { fetch: solid_fetch })
        //console .log("Saved!")

        return Promise.resolve()
    } catch (err) {
        console.error(`error saving items to "${items_URL}" :`, err)
        const error: SyncError = { type: "general", message: err }
        return Promise.reject(error)
    }
}

@AJamesPhillips
Copy link
Author

Related previous forum post describing something pretty similar. https://forum.solidproject.org/t/unable-to-delete-big-files-from-inrupt-net-pod/4039/5

@bourgeoa
Copy link
Member

@AJamesPhillips

  • your profile/card has been recreated. Can you check if everything is working correctly.
    I used a copy of ajp2 for that and just changed foaf:name to "AJP"
  • It seems to me you could have done that repair directly in dataBrowser. I may be wrong. Will have to check
  • Can I manually delete your world_components.ttl ?
  • you may remove my webId from root .acl. Use the sharing-pane from the dataBrowser. (https://github.com/solid/userguide/blob/main/views/sharing/userguide.md)

This does not resolve the 500 problem.
I do not understand because your file is small and so there could be lot of issues.
I never saw this problem on small files using https://github.com/jeff-zucker/solid-file-client library.
On big file this happens and it is related to nginx limiting filesize I do not have the problem on my own server. solidcommunity.net is an alpha server not meant for real production.

Please continue to use solidcommunity.net I'm supporting pod repair, this a good way for improvements from last 2-3 years

But the question raised on reloading the page before the process ends maybe ?

@AJamesPhillips
Copy link
Author

But the question raised on reloading the page before the process ends maybe ?

This is the only obvious thing that comes to mind for me but perhaps others who know the code base better will have better guesses?

@AJamesPhillips
Copy link
Author

Please continue to use solidcommunity.net I'm supporting pod repair, this a good way for improvements from last 2-3 years

I certainly will and thank you for all of your very responsive and excellent help. I need to get something as stable as possible right now so that I can prove to my team that Solid is an ok investment at the moment. If it's not yet ready that's ok but I want to maximise the chance of using anything Solid related which will also maximise the chance of being able to return to solidcommunity.net . Currently it's taken me about a month of lots of trial and most errors so I'm going to stick with inrupt.com for the moment and I'll venture back to the community server when I have more resources 🙂

@AJamesPhillips
Copy link
Author

AJamesPhillips commented Aug 26, 2021

Can I manually delete your world_components.ttl ?

@bourgeoa you are welcome to delete it but do you not want to keep it there to try to debug what's wrong with it / the server? I've got the data on inrupt.com now and it's also backed up locally so if deleting it is the best route for you to fix / debug it then please feel free to do that.

you may remove my webId from root .acl.

For now I will leave you with root access so that you can more easily investigate / add others to investigate.... unless you do not need access any more in which case I can remove you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants