I’m newbie to Grav, after finding some flat file CMS(without database), It fits to my requirements. Thanks Grav Team!
I have almost migrated my database data(BigData, HBase) into Grav pages. At present, the total pages are around 8,000. In future the pages would be greater than 500,000.
When I delete 3/4 of the total pages, it works. If I put remaining pages in pages folder, the browser shows blank page after browser spinner stops
I can not figure out the problem.
My development Environment is-
–> Ubuntu 15.04 LTS, 6GB RAM, PHP 5.6, GRAV latest version with updation,
–> I did not enable cache(bcoz it showing older data/pages).
Please help me, I struck…
A blank page is most probably an error page with errors silenced. Turn on error reporting, it should show a more helpful message. Or check the PHP error_log file which should list some message that helps debug it.
Thanks for your reply. I fixed it, but i don’t know it is best way. The doctrine cache need more memory than my php.ini exists. So, There are 3 ways to increase memory, 1. change php.ini, 2. htaccess, 3. in php code, I added php code(shared server may not allowed to change php.ini) in grav index.php
The code is-
// added by me
ini_set('memory_limit', '-1'); // ini-underscore-set, here underscore not showing?!!
// Ensure vendor libraries exist
$autoload = __DIR__ . '/vendor/autoload.php';
8000 pages is quite a lot for Grav to handle. It can be done but with a good deal of optimization like:
- Using PHP 7 (for 2x speed boost over PHP 5.6
- Using Nginx with Microcaching for better performance
- Turning off page checking for cache:
cache: check: method: none in system.yaml
- Experimenting with
AdvancedPageCache plugins (but not using them at the same time.
However, you are really at the high end of what Grav can handle page-wise. It is really not built to scale to 500,000 pages. Grav was designed to build small to medium sized sites. For large sites you still need a database.
OK, I will try to use the Ngix with Microcaching. Most of the provider not using PHP 7 yet. My provider is also not supporting PHP 7.
Thanks for your advice.
I don’t have idea to leave from Grav, because of easy of development, I like its features.
When i leave from Grav, then I have to go with core PHP work, The most of the database based CMS will not respond high traffic websites.
I have plan to use database with Grav using JSON RESTful web services.
Is there any plugins like JSON RESTful service for Grav?
Flavio did some work on a simple page-level Json REST API here: https://github.com/flaviocopes/grav-plugin-api
We do plan on building an API layer into Grav this year, but won’t be until the second half of the year, or even 3rd quarter. You can easily integrate a database though via a plugin.
This would be an excellent case study of practical limits of flat-file systems and Grav, and though 500.000 is seemingly an unintelligible amount the currently assumed limit of ~500 is only theoretical. It may be argued that if 100-1000 pages can be handled, scaling upwards to 500.000-1.000.000 is only a matter of processing.
Ideally, and I think this will be inevitable for some developer at a point in near-future, a cache-plugin will be written that will utilize parallelization and asynchronous handling of the cache-mechanism - in essence caching pages one by one or grouped to alleviate the use of system resources and organizing the result in chunks that can be used on the server.
Are your pages of the size that each requires a
.md-file and a separate folder?