Skip to content
This repository has been archived by the owner on May 4, 2019. It is now read-only.

OpenStax Import #50

Closed
lucwrite opened this issue Mar 16, 2018 · 13 comments
Closed

OpenStax Import #50

lucwrite opened this issue Mar 16, 2018 · 13 comments
Labels

Comments

@lucwrite
Copy link

Description

OpenStax Import plugin times out (error HTTP 500) when trying to import

Expected behaviour
A book can be imported using the link to the zip file from OpenStax. Here is the link address used
https://cnx.org/exports/0889907c-f0ef-496a-bcb8-2a5bb121717f@2.49.zip/elementary-algebra-2.49.zip

[What you expected to happen]
The book to be imported into the following Pressbook https://pressbooks.bccampus.ca/capilanosandbox/

Actual behaviour
The process timed-out and we received the following error HTTP ERROR 500

Steps to reproduce the problem

  1. Go to Elementary Algebra on CNX https://cnx.org/contents/CImQfPDv@2.49:GfaWl1GG@4/Introduction. Note this has also been tested with two other books
  2. Copy the Zip file URL by right clicking
  3. Select CNX Import of a Zip file in the target Pressbook
  4. Select Import from URL and past in the URL for the zip https://cnx.org/exports/0889907c-f0ef-496a-bcb8-2a5bb121717f@2.49.zip/elementary-algebra-2.49.zip
  5. Click begin import

[First Step, Second Step, etc]

System Information

System Information

Book Info

Book ID: 349
Book URL: https://pressbooks.bccampus.ca/capilanosandbox/
Book Privacy: Public

Browser

Platform: OS X
Browser Name: Chrome
Browser Version: 65.0.3325.162
User Agent String: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36

WordPress Configuration

Network URL: http://pressbooks.bccampus.ca/
Network Type: Subdirectory
Version: 4.9.4
Language: en_US
WP_ENV: Not set
WP_DEBUG: Enabled
Memory Limit: 64M

Pressbooks Configuration

Version: 5.1.0
Book Theme: Open Textbooks
Book Theme Version: 2.1.1
Root Theme: Aldine
Root Theme Version: 1.1.0

Pressbooks Dependencies

Epubcheck: Installed
Kindlegen: Installed
xmllint: Installed
PrinceXML: Installed
Saxon-HE: Installed

Must-Use Plugins

hm-autoloader.php: n/a

Network Active Plugins

BC Post-Secondary Validator: 1.0.0
CC Export for Pressbooks: 0.2.1
f5 Force SSL: 1.0.0
iThemes Security: 6.9.2
Openstax Import for Pressbooks: 1.0.1
Pressbooks: 5.1.0
Pressbooks Stats: 1.4.0
Textbooks for Pressbooks: 4.0.2
WP-Piwik: 1.0.19

Book Active Plugins

Inactive Plugins

Akismet Anti-Spam: 4.0.3
BuddyPress: 2.9.3
H5P: 1.10.1
mPDF for Pressbooks: 3.1.1
WP QuickLaTeX: 3.8.4

Server Configuration

PHP Version: 7.1.15
MySQL Version: 5.5.5
Webserver Info: Apache

PHP Configuration

Safe Mode: Disabled
Memory Limit: 512M
Upload Max Size: 100M
Post Max Size: 100M
Upload Max Filesize: 100M
Time Limit: 60
Max Input Vars: 1000
URL-aware fopen: On (1)
Display Errors: N/A

PHP Extensions

OPcache: Disabled
XDebug: Disabled
cURL: Supported
cURL Version: 7.19.7
imagick: Not Installed
xsl: Installed

@lucwrite lucwrite added the bug label Mar 16, 2018
@bdolor
Copy link
Contributor

bdolor commented Mar 21, 2018

Thanks for reporting Lucas — I could recreate this once, then when I tried again it worked. The file is only 11MB so it shouldn't be that file size is an issue. It may have been something on cnx.org side. Would you mind trying again?

image

@lucwrite
Copy link
Author

Hi Brad both Rajiv and myself are still receiving timeout errors on for this. Here are the details.

Book (CNX) https://cnx.org/exports/0889907c-f0ef-496a-bcb8-2a5bb121717f@2.49.zip/elementary-algebra-2.49.zip

Target Book: https://opentextbc.ca/algebratest/

Error: HTTP Error 500

System Information

System Information

Book Info

Book ID: 230
Book URL: https://opentextbc.ca/algebratest/
Book Privacy: Public

Browser

Platform: OS X
Browser Name: Chrome
Browser Version: 65.0.3325.162
User Agent String: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36

WordPress Configuration

Network URL: http://opentextbc.ca/
Network Type: Subdirectory
Version: 4.9.4
Language: en_US
WP_ENV: Not set
WP_DEBUG: Disabled
Memory Limit: 64M

Pressbooks Configuration

Version: 5.1.0
Book Theme: Open Textbooks
Book Theme Version: 2.1.1
Root Theme: Aldine
Root Theme Version: 1.1.0

Pressbooks Dependencies

Epubcheck: Installed
Kindlegen: Installed
xmllint: Installed
PrinceXML: Installed
Saxon-HE: Installed

Must-Use Plugins

hm-autoloader.php: n/a

Network Active Plugins

Akismet Anti-Spam: 4.0.3
Better WordPress Google XML Sitemaps: 1.4.1
CC Export for Pressbooks: 0.2.1
f5 Force SSL: 1.0.0
iThemes Security: 6.9.2
Openstax Import for Pressbooks: 1.0.1
Pressbooks: 5.1.0
Pressbooks Stats: 1.4.0
Textbooks for Pressbooks: 4.0.2
User Activation Keys: 4.6
WP-Piwik: 1.0.19

Book Active Plugins

Inactive Plugins

BuddyPress: 2.9.3
H5P: 1.10.1
mPDF for Pressbooks: 3.1.1
Relevanssi: 4.0.4
WP QuickLaTeX: 3.8.4

Server Configuration

PHP Version: 7.1.15
MySQL Version: 5.5.5
Webserver Info: Apache

PHP Configuration

Safe Mode: Disabled
Memory Limit: 512M
Upload Max Size: 100M
Post Max Size: 100M
Upload Max Filesize: 100M
Time Limit: 60
Max Input Vars: 1000
URL-aware fopen: On (1)
Display Errors: N/A

PHP Extensions

OPcache: Disabled
XDebug: Disabled
cURL: Supported
cURL Version: 7.19.7
imagick: Not Installed
xsl: Installed

@bdolor
Copy link
Contributor

bdolor commented Mar 22, 2018

@lucwrite - the link to the book you've provided isn't the same one that I've been using.

Can you confirm, this is the book/place where we should both be pulling from? https://cnx.org/contents/e9XCtyLF@3.9:uUfJZx98@4/Preface

@lucwrite
Copy link
Author

lucwrite commented Mar 22, 2018 via email

@thatpsychprof
Copy link

Do you think it is a timeout issue? I also tried uploading the zip file from my computer but it appeared to timeout. If so we could try breaking up the 2GB zip file into smaller ones for each chapter and try uploading one of those?

@bdolor
Copy link
Contributor

bdolor commented Apr 4, 2018

If it doesn't time out first, it's maxing out the memory_limit on the server during a curl operation.

@lucwrite
Copy link
Author

lucwrite commented Apr 5, 2018

@bdolor what further tests do we need to do so that we can provide you and the community more infor so that we start importing OS books again?

@bdolor
Copy link
Contributor

bdolor commented Apr 5, 2018

The issue is that this is a 2 GB book. OpenStax textbooks can still be imported, just not this one book because of its size. No further tests are necessary. I've tried both increasing php's memory limit to 2GB and extending the time limit for http_requests to 1.5 hours. We're bumping up against the limits of normal server configuration and expected functionality.

@thatpsychprof
Copy link

thatpsychprof commented Apr 5, 2018 via email

@bdolor
Copy link
Contributor

bdolor commented Apr 6, 2018

I've fixed the ability to upload zip files in ff36e53 and temporarily gave PHP ridiculous amounts of memory on the server. Huge image sizes are the source of the bloated zip file and perhaps because of how much memory the upload process consumes, also causes some problems importing.

image

But the formulas and content seem intact. https://pressbooksdev.bccampus.ca/elementaryalgebra/ Hopefully this is something that you can work with @thatpsychprof with the help of @lucwrite while the bigger issues are given some time to get ironed out properly.

@lucwrite
Copy link
Author

lucwrite commented Apr 6, 2018

@bdolor thanks for the temporary fix. Would you suggest that we reach out to the OpenStax team to discuss the size of their images and Zip files. This does not seem sustainable for interoperability.

@bdolor
Copy link
Contributor

bdolor commented Apr 6, 2018

If you have the ability to persuade them to optimize their images, it would take a lot off our plate. For example...the worst offender in that book in the chapter 'Add and Subtract Polynomials' which has 272 images (mostly small pictures of equations) each of which are about one half of a MB.

image

Unless their use case is to have these images available for print, which I suspect it is, there is plenty of room to reduce the size of these images without sacrificing quality. The size of that one chapter (m60158), unzipped, is 154MB.

image

@bdolor
Copy link
Contributor

bdolor commented May 8, 2018

this is being addressed in smaller, more actionable issues. #52 #53 #54 #55

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

No branches or pull requests

3 participants