4. Facing the unknown
A very big project :
more than 8 years old
thousands of options, since it works on every host
millions of downloads
a very large userbase
15. Finding the causes
Groups of causes
requirements
filesystem issues
runtime errors
16. Finding the causes
Requirements
PHP versions
database type and version
database permissions
available memory
17. Finding the causes
Filesystem issues
big files
multiple Joomla! installation
18. Finding the causes
Runtime errors
Corrupted install (some hosts blindly delete or rename user files)
Error logs included in the backup
Single big archive file while trying to upload it to a remote storage
Timeouts
Trying to backup huge tables (more than 1M records)
Trying to backup tables from different installations
Backup instance killed by the host
19. Conclusions
Several groups
Each group contains several checks
Every check requires to open and read a (possibly) very big file
Avoid using too many resources and hit the timeout limit
This is the same scenario of a backup
23. How can I put this inside my application?
Log the actions taken during a failure prone process
Analyze the log file
Propose the correct solution with documentation links
Keep the analyzer updated with the latest solutions
24. Real world example: file uploads
Requested features
Multiple upload
Resize images
Thumbnail creation
Apply watermark
25. Real world example: file uploads
Possible failure reasons
Maximum upload size on the server
Maximum POST size
Number of files
No upload directory
Temporary directory unwriteable
Final directory unwriteable
26. Real world example: file uploads
Possible failure reasons
Error while resizing the image
Error while creating the thumbnail
Error while applying the watermark
Error while saving the image file
Error while saving into the db
27. The results
Fewer support requests
Happier customers
More time for coding instead of doing support