Jump to content

Search the Community

Showing results for tags 'ram'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 2 results

  1. I am creating a module that sends pages as en email. I use ->render() to get the content of a PW page and send it as the body of the mail. But something is wrong and I am running out of memory (currently set to 100 MB). This function checks, if there is a page flagged for sending. $mailtempplate is the corpus delicti … public function checkSchedule($event) { // Memory usage $memory = 'Memory Start: ' . memory_get_usage(); wire('session')->message($memory); // Find pages, that are scheduled and have a schedule date that is older than current time plus 60 seconds $scheduled_pages = wire('pages')->find('template=newsletter-mailing, schedule=1, schedule_date<=' . time() + 60); // Check if there are scheduled pages, and stop, if nothing is scheduled if (!count($scheduled_pages)) { return; } // Iterate scheduled pages foreach ($scheduled_pages as $scheduled_page) { // Get the mail-template, i.e. the rendered page (this becomes the mail-body later) // If I just use $mailtemplate = 'Test'; everything works fine $mailtemplate = $scheduled_page->render(); // Convert local/relative paths to absolute URL for links (href) and images (src) if (!strpos($mailtemplate,'href="/') === false) { $mailtemplate = str_replace('href="/', 'href="' . wire('config')->httpUrl, $mailtemplate); } if (!strpos($mailtemplate,'src="/') === false) { $mailtemplate = str_replace('src="/', 'src="' . wire('config')->httpUrl, $mailtemplate); } // Dispatch this scheduled page ("Newsletter") for email $dispatched = $this->dispatchMailing($scheduled_page->title, $scheduled_page->newsletter_recipients, $mailtemplate); if ($dispatched) { $memory .= ' und Memory Ende: ' . memory_get_usage(); // Send reporting mail mail(…); } else { // Something went wrong while sending mail(…); } // Uncheck schedule checkbox, even if there was an error whiele sending! $p = $scheduled_page; $p->schedule = 0; $p->save(); // Clear the mailtemplate for the next scheduled page/mailing unset($mailtemplate); } } I moved $mailtemplate = $scheduled_page->render() out of the foreach() but it doesn't work either. Appreciate any help and tips
  2. Hi everyone, let me first start off by expressing how much I love Processwire, I've succesfully integrated it with about 8 sites now and I'm just so in love with the simplicity (we love you ryan ) I was wondering how processwire scores on the performance/serverload front, how much processwires can I run on my VM with how much ram and are there any recommoned server apache settings? currently I'm running an ubuntu with 4GB ram and 3 cores (1,6Ghz each), I'm using php 5.1 with mod_cgi and the 8 processwire sites use about 1,6GB of RAM, having about 50k visitors/month across these sites I'm wondering how processwire will perform in case of 100k - 200k - 500k - 1M visitors, will the session system last (I noticed it's writing a cached file to the filesystem)? also: what's the limit with the "new Page();" command, is it creating a new directory for every created page, what's the limit (the filesystem? the amout of ram?)
×
×
  • Create New...