Ready to Stop Co-Sleeping?

From The Message Boards

CDbException

CDbException

CDbConnection failed to open the DB connection: SQLSTATE[08004] [1040] Too many connections

/var/www/html/sites/justmommies.com/redesign/releases/2017-07-11_10-42-35/app/controllers/ApiController.php(174)

162     public function actionBoards() {
163            $num_items = 5;
164         //TODO CHANGE IN ORDER TO MOVE TO PROD
165         $date_cut = time() - 100000 * 86400;
166 
167         $sql = "SELECT t.firstpostid, t.threadid, t.title, t.replycount, t.dateline AS created, t.postuserid AS userid,
168         t.postusername AS name, f.title_clean as forum_title, f.forumid as forumid FROM thread t 
169         INNER JOIN forum f ON f.forumid = t.forumid 
170         WHERE f.showprivate = 0 AND f.password = '' 
171         AND t.lastpost >= $date_cut  AND f.title != 'Articles'
172         ORDER BY t.lastpost DESC LIMIT $num_items";
173 
174         $connection = Yii::app()->dbvb;
175         $command=$connection->createCommand($sql);
176         $dataReader=$command->query();
177 
178         $data = array();
179         foreach($dataReader as $row) {
180 
181             $firstpostid = $row['firstpostid'];
182 
183             $selectAux = "SELECT pagetext FROM post WHERE postid = ".$firstpostid;
184 
185             $connection = Yii::app()->dbvb;
186             $command2=$connection->createCommand($selectAux);

Stack Trace

#4
+
 /var/www/html/sites/justmommies.com/redesign/releases/2017-07-11_10-42-35/app/controllers/ApiController.php(174): CModule->__get("dbvb")
169         INNER JOIN forum f ON f.forumid = t.forumid 
170         WHERE f.showprivate = 0 AND f.password = '' 
171         AND t.lastpost >= $date_cut  AND f.title != 'Articles'
172         ORDER BY t.lastpost DESC LIMIT $num_items";
173 
174         $connection = Yii::app()->dbvb;
175         $command=$connection->createCommand($sql);
176         $dataReader=$command->query();
177 
178         $data = array();
179         foreach($dataReader as $row) {
#12
+
 /var/www/html/sites/justmommies.com/redesign/releases/2017-07-11_10-42-35/www/index.php(47): CApplication->run()
42 ini_set('display_errors', 1);
43 
44 require('./../app/lib/vendor/autoload.php');
45 require('./../app/lib/vb.php');
46 
47 Yiinitializr\Helpers\Initializer::create('./../app', 'main', array('env', 'dev'))->run();
48 
2017-07-20 22:07:04 Apache Yii Framework/1.1.17

By JustMommies staff

How to Get Your Toddler Out of Your Bed

You’ve enjoyed your time as a co-sleeping family, and now it’s time to reclaim your bed as your own. But your toddler is putting up resistance, and no one’s getting a good night’s sleep anymore. After all the time you’ve spent co-sleeping, how do you help your child learn to sleep on his or her own?

First, start out by understanding that while children are generally resistant to change, they are also extremely adaptable. So you should definitely expect some resistance, but don’t give up hope that the change is ever going to happen. With gentle guidance – along with consistency – you can help your children learn almost anything.

When it’s time to stop co-sleeping, you can set the stage for your child by letting them pick out a cool new big-kid bed and bedding. Make a big deal about what a nice, cozy bed it is. Sit in it with them and read a book or tell stories so that they have pleasant feelings about being in bed. Then let them give the bed a “test run” by having them take their daytime naps there.

Incidentally, a “toddler bed” – a tiny kid-sized bed with built-in rails – isn’t the best choice when you’re trying to end co-sleeping. Your little one is probably better off with a full-length twin bed that will allow you to lie down next to your child if he or she needs extra reassurance at night. You can choose a low platform-style bed that will allow even small toddlers to climb in and out easily. Just make sure you use a safety guard on the side of the bed.

Next, help them select a soft, cozy security object. It could be a blanket, a stuffed animal, or even an old t-shirt from mom or dad, as long as it has some comfort value to your child. Then get them in the habit of snuggling and sleeping with it at night.

It may also help to wean them from nighttime nursing so that when they wake up in the middle of the night, they are not looking for mom to nurse. Get them used to having a reassuring pat or gentle “shushing” to go back to sleep.

When it’s time to make the change, follow the exact same bedtime routine that you have always had, except follow the routine in their bed in their room. If they wake up in the middle of the night, try to go to where they are to reassure them before they come to you.

If they come to your bed in the middle of the night, you have two choices. The first approach is to calmly and quietly walk them back to their bed and make it as boring and predictable a routine as possible. The idea is that if they wake up they know that they will always get the same thing: a quiet walk back to their own bed. The second approach is to give them their own mattress on the floor of your room and let them crawl onto that bed in the middle of the night. Ideally, they will get used to sleeping through the night so that they come into your room less and less all the time. If and when they make it through the night without coming into your room, lavish them with praise.

Whichever technique you use, ending co-sleeping is not going to end overnight. Think of it as a process that may take a few weeks or months. But once you help your kids realize that they can do it, they will rise to the occasion – and most likely they will surprise you with what good sleepers they can be on their own.

Today on JustMommies

Best Bottles for Nursing Babies

If you’re in the market for baby bottles, you have particular needs if you’re a breastfeeding mom. You want to look for a bottle that mimics the motion, flow and feeling of breastfeeding to avoid...

Best Last Names for First Names

Giving a child a family name has long been a popular tradition. Often boys are named after their fathers or girls after a grandmother or aunt. However, new parents create different trends. Many moms...

Gender Identity: Raising a Transgender Youth

Your child is different. Perhaps he wants to don a dress, or you find him in your shoes and sporting your makeup. Or, maybe it’s the opposite. Maybe your daughter hates everything feminine and acts...

When Parents Aren't on the Same Page

Think back to the time before you became a parent: Maybe you talked with your partner about having children. Yet, your “parenting styles” may not have entered the conversation. Some clinical...