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

Chunking issue #187

Closed
exander77 opened this issue Jan 23, 2022 · 8 comments
Closed

Chunking issue #187

exander77 opened this issue Jan 23, 2022 · 8 comments

Comments

@exander77
Copy link

I had to change:

        log2_upload_size = Integer.parseInt(props.getProperty("loguploadsize", "22")); // 4 MB

to:

        log2_upload_size = Integer.parseInt(props.getProperty("loguploadsize", "21")); // 2 MB

Otherwise, uploads are rejected when they are above a certain size.

@exander77
Copy link
Author

No. It is not a solution, the problem still occurs. There is some chunking problem.

@exander77 exander77 changed the title Chunk size issue Chunking issue Jan 23, 2022
@MER-C
Copy link
Owner

MER-C commented Jan 23, 2022

This works for me - one of the test images I uploaded to test and verify #186 was 11 MB.

https://test.wikipedia.org/wiki/File:Test1235.jpg

Please provide examples of images that are broken and any error messages and stack traces that you get in the logs.

@exander77
Copy link
Author

vicuna.zip

2 out of 3 of these doesn't work.

@MER-C
Copy link
Owner

MER-C commented Jan 24, 2022

jshell> test.upload(new File("IMG_20220117_122405.jpg"), "File:Test1236.jpg", "Test image", "blah")
Jan 24, 2022 7:15:05 PM Wiki getPageInfo
INFO: Fetching URL https://test.wikipedia.org/w/api.php?&maxlag=5&prop=info&inprop=protection%7Cdisplaytitle%7Cwatchers&format=xml&action=query
Jan 24, 2022 7:15:05 PM Wiki getPageInfo
INFO: [test.wikipedia.org] Successfully retrieved page info for 1 pages.
Jan 24, 2022 7:15:05 PM Wiki getToken
INFO: Fetching URL https://test.wikipedia.org/w/api.php?&maxlag=5&meta=tokens&format=xml&action=query&type=csrf
Jan 24, 2022 7:15:06 PM Wiki upload
INFO: Fetching URL https://test.wikipedia.org/w/api.php?&maxlag=5&format=xml&action=upload
|  Exception java.lang.UnknownError: MW API error. Server response was: <?xml version="1.0"?><api servedby="mw1424"><error code="badupload" info="The file for &quot;file&quot; was only partially uploaded." xml:space="preserve">See https://test.wikipedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at &amp;lt;https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/&amp;gt; for notice of API deprecations and breaking changes.</error></api>
|        at Wiki.detectUncheckedErrors (Wiki.java:8380)
|        at Wiki.checkErrorsAndUpdateStatus (Wiki.java:8456)
|        at Wiki.upload (Wiki.java:4390)
|        at (#4:1)

This is not a chunking issue because this should have uploaded in one go.

@exander77
Copy link
Author

@MER-C Yes, it is more of a problem with not chunking. But I am not sure what is the issue, I lowered it to 2M and it still problem appeared with some files.

@MER-C MER-C closed this as completed in d270616 Jan 29, 2022
@exander77
Copy link
Author

@MER-C The issue exists. Vicuna cannot upload some files because of this.

@MER-C
Copy link
Owner

MER-C commented Jan 29, 2022

Did you test the new change? The file for which the log is pasted above uploaded successfully: https://test.wikipedia.org/wiki/File:Test1236.jpg

@exander77
Copy link
Author

@MER-C Oh, it is fixed here? d270616

Will test.

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