PDO statement::execute(): MySQL server has gone away

Just in case you have same issue when you deal with big data in Laravel, and try to save the big data into database, you may have same issue.

Original I thought it was time out caused MySQL connection lost, after a couple of round test, I found it’s not because connection lost. (You can use mysql_ping() to test connectivity). The reason is because the data is too big which is out of max_allowed_packet = 2M. Then I changed it to 5M, and now I got another issue:

sqlstate[42000]: syntax error or access violation: 1118 the size of blob/text data inserted in one transaction is greater than 10% of redo log size. increase the redo log size using innodb_log_file_size.

This is because we are using innodb engine, which saved transactions into log file in case you want to rollback the last operation. So the old value of innodb_log_file_size is 5MiB, then I changed to 20MiB, then restart MySQL DB server, the issue is gone.

It’s very interesting that we all thought the server gone away is because connectivity issue, but it’s because we don’t have enough memory of file size settings.

Posted in Uncategorized | Leave a comment

A Work-from-Home Guide to Internet Speed

If your job depends on your home Internet, our bandwidth guide is for you.

Editor’s Note: Frontier Business posted the article below on LinkedIn.

undefinedThere are many reasons why almost 3% of the workforce is spending less time at the office. One study even shows that employees who work from home are actually more productive thanks to fewer distractions from co-workers and a quieter workspace.

To keep up with your workload, though, your home Internet speed needs to be at least as reliable as business Internet. Read our guide below to help determine how much bandwidth you need and compare residential or business service.

Determining Your Current Bandwidth

Bandwidth is the maximum rate at which your computer can receive information from the Internet. Larger files, such as movies, require more bandwidth, while checking your email or working on a Word document uses less.

To determine your current bandwidth, test your Internet speed with an online speed test tool. While your service provider might promise a certain maximum speed, the speed you actually get depends on the number of devices that connect to the Internet at the same time, the types of activities you do (word processing, video conferencing, chatting with clients, etc.), and cloud and storage needs.

In most cases, Internet connections download much faster than they upload, since most online activity involves your computer receiving information from the Internet. Upload speeds tend to be slower because sending emails and posting on social media don’t require a lot of bandwidth, but depending on your specific needs you could require a faster upload speed.

Calculating How Much Bandwidth You Need

If you work from home and are considering adjusting your Internet service, you’ll first need to calculate how much bandwidth you actually need.

For example, you wouldn’t want the most elite business Internet service plan if you live alone and work from home during the day. But if you have a family, factor them and their online activities into your bandwidth needs.

Opting for Residential or Business Internet

Residential Internet will probably be enough if you use your home as a satellite office, but you may have to deal with speed lags throughout the day because some residential lines are shared with your neighbors to keep the overall cost down, be sure to check with your local service provider. If you’re a small-business owner, you may want a dedicated business line so you’ll have a consistent connection around the clock.

Another perk to a business line is some Internet Service Providers (ISPs) offer service-level agreements (SLAs) that can guarantee a certain level of performance, as well as compensation if the service doesn’t meet that level. ISPs may also offer small business-owners Virtual Private Networks (VPNs), data backup, security, and Wi-Fi network setup for an additional fee.

Some companies require their remote workers to connect their home computers to a VPN—a private network that allows you to share data securely. If your employer hasn’t provided a computer with an already-established VPN, you may want to think about that feature when you’re deciding between residential and business Internet for your home.

Choosing Your Internet Service Provider

Now that you’ve figured out how much bandwidth you need and whether you want residential or business high-speed Internet service, how do you choose a provider? Consider the following tips:

  • Make sure they offer high-speed Internet. The faster your Internet connection, the better—especially when you’re working on a deadline.
  • Compare prices based on download and upload speeds. Not all companies use the same unit of measurement for speeds (i.e., 60 Mbps is not the same as 60 Gbps).
  • Pay attention to contract terms. If you’re working from home short term, you may not need a year-long contract. Some ISPs offer month-to-month options, while others will charge you a fee for canceling service before your contract ends.
  • Ask about add-ons and fees. Business customers may get some added perks with their service plans, but even if you decide to go with a residential plan, ask about any additional benefits or fees. For example, some providers charge a one-time or monthly fee for the router, and some offer free virus protection or website hosting.

In the end, it just takes a little research into Internet speeds, and you can get as much work done at home as you do in the office—if not more!

Posted in Uncategorized | Leave a comment

Why we lost 1M people?

Today is March 28, 2019, When I open the census.gov page, https://www.census.gov/popclock/. I found US population decreased again, that’s good news or fake news??

I pulled my last saved screen shot on Dec 04, 2018, the population number is 329,114,356.


So I use select a date to search the US population on Dec 04, 2018, the population number is only 328,096,801, we lost over 1 Million people!!


I don’t know how to explain this: on the same day the data difference is 1 million? which number I should trust on earth?

Posted in Uncategorized | Leave a comment

Linux grep command

Sometimes, we need grep a string with slash/ or backslash\, like we want to know where we called this model “use App\Models\Users” in the code.

First, I tried grep -rils “Models\\Users”, nothing returned;

Then I tried grep -rils “Models/\Users”, still nothing returned;

Very occasionally, I tried grep -rils “Models\\\Users”, it returned results as I expected.

Posted in Computers and Internet | Leave a comment

Digital Tranformation

Image | Posted on by | Leave a comment


说句老实话,第一遍看的时候,的确有些懵,但看第二遍的时候,随着很多细节的发掘,和前后情节的贯穿,明白了张艺谋想要表达的令你扑朔迷离的影子替身的故事,明白了表面的棋子和背后的棋局之间的道理。后来又花时间看了纪录片《张艺谋和他的影》,更加理解了张艺谋对电影的执着,追求完美严谨的呈现,所有道具,布景都一丝不苟。而且张艺谋的每一部电影都不重复,都在追求新的尝试,既然是有新的尝试,就一定会有失败和成功。在《影》这部电影中,我看到了成功,色彩运用的成功,演员表演的成功, 专业团队合作的成功。也许你看到只是两个小时的电影,但是这个屏幕背后所有人的付出,精益求精的态度,让你非常感动。我们看到的《影》是一部视觉和情节都超越了好莱坞的优秀电影作品。





Posted in Movies, Uncategorized, 兴趣 | Leave a comment

6 Habits Putting You at Risk for Identity Theft

6 Habits Putting You at Risk for Identity Theft (From Frontier.com home)
Editor’s Note: The article below was published by NBC News Digital on its website.
By Emily Long
Data breaches and hacks are often unavoidable, but security
experts say there are some everyday habits that put
consumers even more at risk.
According to a report by Javelin Strategies, U.S. residents
lost $16.8 billion to fraudsters in 2017, and the number of
victims increased 8 percent over the previous year.
Unfortunately, identity thieves are getting smarter, which
means consumers have to be even more vigilant when it comes to protecting their personal
information and their financial well-being. Thieves are launching more complex schemes, but
consumers also don’t think twice about many common practices that put their data — and their money
— at risk.
passwords for each account, change your passwords often, and keep track of your logins with a
password manager app.
2. You avoid checking banking and credit card statements on a regular basis
Checking your account balances isn’t always fun, but not doing so
means you could miss fraudulent transactions that indicate your
identity has been stolen. You should scan your account statements
and your credit report frequently for purchases you didn’t make and
lines of credit you didn’t request.
“Reviewing your bank accounts, credit card statements and credit reports regularly won’t
necessarily prevent identity theft, but it will help you catch it early before you incur too much
damage,” says Brianna Jensen, an identity theft expert with consumer security site ASecureLife.
Credit card fraud is one of the most common types of identity theft. You are eligible for a free
report from each of the three major credit bureaus once a year, so request one every few
months in addition to reviewing other financial statements at least weekly.
3. You overshare on social media and don’t check your privacy settings
Social media is rife with scammers who take advantage of weak
privacy settings to lure you in. Even if you don’t fall victim to a phony
Facebook lottery, thieves can still glean personal information from
your supposedly private profiles. Geotagged photos, birthday posts,
and childhood throwbacks give savvy criminals answers to those
oversimplified security questions and help them impersonate you.
“Don’t share any information with sites unless you are comfortable with that information being
posted on a postcard and sent to your own house,” says Ron Schlecht, managing partner at
cybersecurity firm BTB Security.
Cut thieves off by tightening your privacy settings and limiting what you post.
4. You send sensitive information via email or unsecure messaging services
Nigerian princes aren’t the only ones scamming consumers through
email. If you include account numbers, attach sensitive documents or
simply write things you’d never share publicly, you open yourself up to
identity theft. Even if you have a strong password or use two-factor
authentication to protect your own account, your messages are only
as secure as those you send your information to.Plus, when you delete
messages from Facebook, Slack or email, that data still lives in a place that’s accessible to
thieves who can intercept or hack into accounts or servers.
“Our inbox, sent and deleted folders are treasure troves of sensitive information about
ourselves and our family,” says Mike Fleck, vice president of security at Covata, which provides
data security solutions for businesses. Avoid sending account numbers and sensitive documents
via unencrypted messages.
5. You rarely update your apps and device software
Frequent app updates aren’t just there to annoy you. They actually
patch critical security holes that would otherwise leave your data
vulnerable to hackers and viruses.
“What might have been secure enough yesterday is no longer secure
enough today — sometimes because bugs have been discovered and
sometimes because technologies have evolved,” says Gary McGraw, vice president of security
technology at software security company Synopsys.
If your devices have an automatic update setting, enable it. And if you get a notification that a
new software version is available, address it immediately.
6. You give away too much information — especially when you are in public
There are very few situations that actually require you to provide any
kind of personally identifiable information in public or to someone you
don’t know, so be wary of anyone who requests this.
For example, a telemarketer calls and asks you to confirm your name
and address. You have no way to verify that person’s credentials,
which means you just gave your name and location to a stranger, which they can then use to
piece together your personal profile. Other situations are less sinister but just as risky: You
don’t think twice about providing your credit card number to confirm an appointment or
stating your social security number for your doctor’s office over the phone, but you never know
who is listening nearby.
Before you give away any information, whether in person, over the phone or online, make sure
that it’s absolutely necessary to do so and that your data will be communicated or transmitted
Experts say that data breaches, hack and identity theft are an all-too-common — and often
unavoidable — reality, so consumers should take steps to avoid becoming victims whenever possible.“
The most dangerous habit a person can have is to be too trusting,” says Mark Gazit, CEO of data
analytics provider ThetaRay. Whenever you’re dealing with your financial information and personal
data, “you must assume that you will be hacked.”!

Posted in Uncategorized | Leave a comment